Forum
19:07
10/08/2009
Hello Tony,
I read frequently the requirement to use dataUrl with additional parameters like rowid or some other values from the current row. Currently I suggest in the case the solution like described here: to use data parameter of ajaxSelectOptions, where one get the value of currently selected row. The way could wotk in many scenarios, but it's not safe especially in multiselect scenario.
I suggest to allow to define dataUrl as function which will get some parameters (like options.id, options.name, ...) which describes the context. In general one can just include testing whether dataUrl is a function in the line like this and if needed one can call the function with the corresponding parameters from the current context.
Best regards
Oleg
14:32
10/08/2009
Hello Tony,
there are exist more and more public services which supports RESTful API. For example Windows Azure Mobile Services REST API an example. The exsiting services can require to use rowid as the part of URL (see here and here for example). The current implementation of Save button of inlineNav or the implementation dataUrl of still don't allow to modify the URL by appending "/" + encodeURIComponent(rowid). The feature postData as function allows to post rowid, but not as the part of URL.
The most simple and flexible change in jqGrid code seems to me still to allow usage of function as the value of url (or surl, dataUrl). If one just change the line
in the same way as the line with data option
it will get the most flexibility. I mean the code like
options.dataUrl.call($t, rowid, vl, String(options.name)) :
options.dataUrl,
The same changes one could do in other parts of jqGrid where jQuery.ajax are used. The most important place seems for me saveRow, bacause there are no way to modify url dynamically especially in case of usage "Save" button of inlineNav.
Simple modification of the line
to something like
will give developer full flexibility to generate URL dynamically.
Best regards
Oleg
11:48
Moderators
30/10/2007
Hello Oleg,
Thanks. I will try to implement this later.
Kind Regards
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.
Most Users Ever Online: 715
Currently Online:
61 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66