Forum
Topic RSS
I want to default fields on new records to the values selected on the previous search so that, say, I search for Item = 'Hats', and whether I find any or not and the grid displays any or not, when I click on Add, the default for Item (a dropdown field on the edit form) is 'Hats'.
Is there a way to make this happen?
Thanks
Reg
I think I figured out most of this.
I retireve the search criteria like this:
beforeShowForm : function (formid) {
var searchOptions = $("#postingtime").getGridParam("postData");
if(searchOptions.item_fk == 0) {
// suppress the edit form
} else {
// allow editing and set the default values
$("#item_fk",formid).val(searchOptions.item_fk);
};
What I haven't been able to figure out is how to suppress the edit form. return[false] doesn't do anything.
Am I going about this the best way? How can I prevent the form showing?
Thanks,
Reg
19:17
Moderators
30/10/2007
OfflineHello Reg,
Currently this is not possible, but I think that this have sense and will try to realize it in the next release.
In the mean time you can not use the build in add/edit in navigator, but rather to add a custom button in navigator with add/edit and when using onClickButton option to use this logic for lunching or not the edit form
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.
Most Users Ever Online: 994
Currently Online:
19 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
Log In
Home