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
How to dynamically update data when editing
09/11/2009
18:24
Avatar
ellenecho
Member
Members
Forum Posts: 3
Member Since:
10/11/2009
sp_UserOfflineSmall Offline

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

09/11/2009
22:20
Avatar
Romyn
Member
Members
Forum Posts: 45
Member Since:
13/06/2009
sp_UserOfflineSmall Offline

Hi,

While I'm not Tony I'm pretty sure he'd tell you to read the docs Wink - 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

10/11/2009
09:48
Avatar
ellenecho
Member
Members
Forum Posts: 3
Member Since:
10/11/2009
sp_UserOfflineSmall Offline

Thank you very much, Romyn!

The demo is exactly what I have been looking for. 🙂

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information