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
changing name of ID field on grid row save
08/10/2008
11:26
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

Greetings all,

  when I create an editable grid, the "id" column passed to the save page is always "id", even though my colModel specifies it like this:

colModel:[
                {name:'questionid',index:'questionid',width:30},
                .... other stuff
            ]

I'd expect that when the row is saved, the form field would be named "questionid" instead of "id". I can't seem to find any other way to change this.

Is it possible to change the name of the ID field passed in the form post?

thanks.

marc

08/10/2008
13:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Make this field editable. This way you can post it to the server

Regards

Tony

P.S. Or if you do not want this use onClickSubmit event and

pass this data to the server

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.

08/10/2008
14:20
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

Tony,

 thanks for responding. i certainly dont' want to make an ID field editable! But I couldn't find the onClickSubmit event documented in the docs pdf. Do any of the examples on the demo page show this functionality?

thanks!

marc

08/10/2008
15:12
Avatar
YamilBracho
Member
Members
Forum Posts: 124
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

I use something like

              beforeSubmit: function() {
                 var sr = jQuery("#list").getGridParam('selrow');
                 var rowData = jQuery("#list").getRowData(sr);
           
                  this.editData = {"co_sector" : rowData['co_sector']};
                  retarr = {"co_sector" : rowData['co_sector']};
                  return retarr;
              }

"co_sector" is a hidden field and it is my primary key. In your request will come an "co-sector=value" in the url.

HTH

09/10/2008
02:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Please use the online documaentation which is up to date.

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:
84 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