Forum


08:38

25/03/2009

Hi Tony,
We have a situation where one of the columns in the grid is a checkbox. We want to allow the user to toggle this checkbox.
What's the best approach to doing this?
here is what we have done so far
cellEdit: true
cellsubmit: 'clientArray'
colModel:[{name:'IsPrimary',width:60,formatter:'checkbox',editable:true,edittype:'checkbox'}
afterSaveCell: function(rowid, cellname, value, iRow, iCol) {do something}
Problem
1) when we move focus to another row the changes are lost as suppose to keeping focus on the same row.
2) We still want the entire row highlighted but ONLY individual cells get highlighted on selection.
Thank you
for the 1st question, maybe you can add this one in your code..
var lastsel2 ;
.
.
.
.
onSelectRow : function(idd){
if(idd && idd!==lastsel2){
recid = idd;
jQuery('#xx').editRow(idd,true);
jQuery('#xx').saveRow(lastsel2); //it will save your changes
lastsel2 = idd;
}
},
"God Gave you a gift of 86,400 seconds today.
Have you used one to say thank you?"
Most Users Ever Online: 715
Currently Online:
165 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