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
Cell Editing checkbox problem
19/02/2009
14:57
Avatar
Rick.Beery
Member
Members
Forum Posts: 8
Member Since:
09/01/2009
sp_UserOfflineSmall Offline

I am trying to use cell editing with a check box. The issue is if the checkbox was previously checked "Yes" and I try to change it to No (unchecked), then use then mouse to click another cell the value does not get saved to "No" ie unchecked. If I use the tab key to move to the next cell everything works OK since saveCell() is called instead of editCell(). If I do the same operation and the value was previously unchecked then changing to checked and clicking on a different cell does save the checked (Yes) value successfully.

The difference is in editCell: the lines:

var vl = $("td:eq("+$t.p.savedRow[0].ic+")>#"+$t.p.savedRow[0].id+"_"+$t.p.savedRow[0].name,$t.rows[$t.p.savedRow[0].id]).val();
                if ($t.p.savedRow[0].v !=  vl) {
                    // save it
                    $($t).saveCell($t.p.savedRow[0].id,$t.p.savedRow[0].ic)
                } else {
                    // restore it
                    $($t).restoreCell($t.p.savedRow[0].id,$t.p.savedRow[0].ic);
                }

The value for vl for the 'yes' -> 'no' case is 'yes' instead of 'no'. Thus when comparing it to the saveCell value, it is the same so it restores it.  In the 'no' -> 'yes' case the two values are different this saveCell is called.

I tried both the 3.4.1 and 3.3.2 version with same result. I am also using 'clientArray'.

19/02/2009
15:12
Avatar
Rick.Beery
Member
Members
Forum Posts: 8
Member Since:
09/01/2009
sp_UserOfflineSmall Offline

In my version I tried commenting out these lines

//                // if so check to see if the content is changed
//                var vl = $("td:eq("+$t.p.savedRow[0].ic+")>#"+$t.p.savedRow[0].id+"_"+$t.p.savedRow[0].name,$t.rows[$t.p.savedRow[0].id]).val();
//                if ($t.p.savedRow[0].v !=  vl) {
//                    // save it
                    $($t).saveCell($t.p.savedRow[0].id,$t.p.savedRow[0].ic)
//                } else {
//                    // restore it
//                    $($t).restoreCell($t.p.savedRow[0].id,$t.p.savedRow[0].ic);
//                }

Leaving only the saveCell() line to execute and thus letting saveCell() make the decision whether the value has changed. At least in my small case it works. Don't know if will break in other scenarios.

20/02/2009
02:00
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

There is a known bug when a checkbox is used in all editing modules. I will publish second release of 3.4 soon.

Thank you

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.

01/04/2009
13:35
Avatar
Rick.Beery
Member
Members
Forum Posts: 8
Member Since:
09/01/2009
sp_UserOfflineSmall Offline

FYI, I have had to apply the same fix for both 3.4.2 and 3.4.3 to get the checkbox to work.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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