Forum


10:07

Moderators
30/10/2007

Hello,
What you mean with this?
Do you use inline edit or formedit?
Please be a more detailed in question.
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.
10:26

14/07/2008

I'm using inline editing. I don't have any code implemented yet, because first I need to know if this is possible. Let's suppose I have the example code
colModel:[ {name:'id',index:'id', width:55},{name:'invdate',index:'invdate', width:90, editable:true}, {name:'name',index:'name', width:100,editable:true}, {name:'amount',index:'amount', width:80, align:"right",editable:true}, {name:'tax',index:'tax', width:80, align:"right",editable:true}, {name:'total',index:'total', width:80,align:"right",editable:true}, {name:'note',index:'note', width:150, sortable:false,editable:true} ],
In this example, the field 'name' is editable, so it will be passed to the server (a struts action in my particular case) through the request.
If the field "id" is the PK of my table, how can I pass it to the server script without making it editable?
Now, let's suppose the PK of my table is formed by two attributes, let's say 'name' and 'tax'. How can I pass these two without making them editable? Even more, how can I pass them without showing them to the user in the table? (as they conform the primary key of the table, I don't want the user neither modify them nor even view them).
I hope this helps to clarify my question... thanks in advance
Regards
10:33

Moderators
30/10/2007

Hello,
Please refer to docs. You can use extraparams for this purpose.
Before editing the rows you can get the hidden fields
with getRowData method.
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.
17:20

14/07/2008

Ok, it's done :)) Thanks a lot, the truth is that I was looking at the examples and forgot about the docs themselves... after reading and a little bit of testing it's working now.The only thing I can't solve is that when I change a cell value and press enter, the value sent to the action servlet is the old one, not the one I've just entered. Perhaps I've not understood the doc in a correct manner...I've checked that, if I introduce a second new value in the cell, the first new value is sent to de servlet and then the field is updated to that value (the second). Could you help me with this?
Thank you very much!
17:56

14/07/2008

Ok, I solved it. I was using the getRow method before the editRow method, and then passing the extraparams with all the row fields (including the old value of the field I was editing). I've manipulated the array so that only pass the extraparams I need, not everyone. Now the plugin works perfectly...
Thanks a lot and sorry for the inconvenience. Congratulations, it's the one of the best (if not the best) grid plugin I've seen.
Most Users Ever Online: 715
Currently Online:
70 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