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
Returning Record ID to Server
10/11/2008
17:39
Avatar
Barry
Texas, USA
Member
Members
Forum Posts: 38
Member Since:
04/11/2008
sp_UserOfflineSmall Offline

Hello,

I'm working with the NavGrid Demo on my own data.

The primary key of my table is named "player_id".

I have the colModel like this:

colModel:[
        {name:'player_id',index:'player_id', width:55, key:true, editable:false,editoptions:{readonly:true,size:10}},

With edits and deletes a parameter id gets returned. If Key:true then id=selected player_id. If I omit "key:true" then id=actual grid row id.

In my rigid world I need to send back "player_id" not "id".

I have searched this forum, Google, and the docs. I understand what I need to do is to use an event OnClickSubmit(). I also saw a few places wher Tony said to read the docs. I read the docs, but I guess I am not smart enough to understand how to hook the code together.

Suggestions please! Thanks

11/11/2008
07:38
Avatar
YamilBracho
Member
Members
Forum Posts: 124
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

I think you can use the setPostData()  method of the jqgrid object.

Check the PostData sample in the samples page (New in version 3.1)

11/11/2008
11:13
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I see editable:false - when set this way this field will be not in the formedit.

Also to work set them to editable.

The readonly attribute guarantee that this can not be changed from

the user

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.

11/11/2008
12:00
Avatar
Barry
Texas, USA
Member
Members
Forum Posts: 38
Member Since:
04/11/2008
sp_UserOfflineSmall Offline

Tony,

Thanks! I think the names are not as intuitive as they could be. But it does do what is required. I didn't want to show the ID column in either the grid or edit form so I added hidden:true. It works fine!

Thanks for taking the time... I'm just starting to look at jqgrid, but I do like it plenty.

Thanks Again!

Barry

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