Forum


18:24

10/11/2009

Hi, Tony,
I am working with jqgrid and wonder how I could achieve dynamic editing.
For example, I have three columns in the grid, "item price", "tax" and "total amount due". I would like the item price to be the only editable field.
When editing one single row, users would modify the item price and see the tax and total amount automatically updated according to the item price entered.
Is this doable? If yes, would you let me know how?
Thank you very much
22:20

13/06/2009

Hi,
While I'm not Tony I'm pretty sure he'd tell you to read the docs - and as I ask a few questions it's only right that I try and answer one every now and then when I can.
The answer is yes you can and there is a good example on the demo pages
http://trirand.com/jqgrid/jqgrid.html
Goto New in Version 3.3 and select the Cell Editing example.
That demo shows the use of cell editing and the afterSaveCell() method. When a value in the Amount or Tax columns are changed the afterSaveCell call then updates the Total column with a new calculated amount using setRowData.
That's the principle you're after I believe.
Hope that helps
Regards
Romyn
Most Users Ever Online: 715
Currently Online:
74 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