Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Defining ID parameter in formatter's showlink
02/04/2009
16:58
Avatar
tacman1123
Member
Members
Forum Posts: 7
Member Since:
18/03/2009
sp_UserOfflineSmall Offline

Formatter automatically appends id=n, where n is the primary key of a row if the formatter is set to showlink.  This happens in other places as well (edit, search).  Would it be possible to set the name of the primary key when initializing the class?  If I'm displaying a list of customers and I want to see their invoices, and I set a column to showlink (say, the number of open invoices), I want to call a script in the format invoices.php?customer_id=n, not id=n (which may give me invoice number n, if anything).  This is further complicated if I'm showing a list of products sold, and I want to see all the invoices where they were sold.  If I set showlink, the default comes out to invoices.php?id=x

Obviously, I can add my own extra parameter to this id=n&id_name=customer_id.

Even better would be a template or sprintf that would define where I wanted the ID.  For example, I use a lot of rewrite rules, for our news table I don't want articles.php?id=777&id_name=article_id, I want the much cleaner

/news/article_777.html

Also, can you explain showaction?  I can't figure out how to use it.

Thanks!

Tac

03/04/2009
02:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello Tac,

Thanks for this. I think that using template is one very good approach. The question is how to do this in easy way for the developer. I will think about this. If you have ideas will be glad to hear.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
52 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information