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_Related Related Topics sp_TopicIcon
Automatically update a cell after editing another one
25/01/2013
15:40
Avatar
newUserId
Member
Members
Forum Posts: 4
Member Since:
25/01/2013
sp_UserOfflineSmall Offline

Hi. I have the following problem.

I have a cell with edittype = "checkbox" and a formatter that turns the chosen value into a check or a cross image. When I edit it, I need to automatically update another cell (the following one) that has the same property (a checkbox in edit, turns into a check or a cross image). I have been doing this manually in the afterSubmitCell event for these two cells, by erasing the innerHTML in the other cell and appending a span and an img, like the formatter does for each cell after edit.

Is there any way to do this automatically? I tried using the editCell and saveCell methods, but they don't have a way to set the new value to each cell, so they just send the current value to server.

Thanks.

25/01/2013
16:33
Avatar
aram535
Member
Members
Forum Posts: 6
Member Since:
24/01/2013
sp_UserOfflineSmall Offline

I think you can use something like:

onSelectRow: function (id) {

    var rowData = $(this).getRowData(id);

    // now you can manipulate rowData as it has all of the DOM elements of that row.

}

25/01/2013
17:05
Avatar
newUserId
Member
Members
Forum Posts: 4
Member Since:
25/01/2013
sp_UserOfflineSmall Offline

aram535 said:

I think you can use something like:

onSelectRow: function (id) {

    var rowData = $(this).getRowData(id);

    // now you can manipulate rowData as it has all of the DOM elements of that row.

}


I thought onSelectRow wasn't available with cell edition?

Anyway, doesn't that fire when you choose a row? I need the change to happen after I finish changing the value of the checkbox in one of the cells.

Thanks.

28/01/2013
15:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

It is usefull to see docs, events and methods, related to this

Regards

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

Currently Online:
23 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