Forum


19:18

11/02/2010

Hi
Situation:
I have a grid containing dynamic rows & colls filled with checkboxes.
Purpose is to save changes made to those checkboxes.
Problem:
When clicking a checkbox, the edit mode isn't triggered and therefore no change has been made.
I have to click on a cell to do this.
Click on cell marks cell changed and value has changed.
During my search on the forum I found following topics:
http://www.trirand.com/blog/?p.....p;search=1
http://www.trirand.com/blog/?p.....-jqgrid-36
Neighter of them could provide me a solution.
Source (limited):
$("#grid").jqGrid(Thanks in advance
{
url: '.../GridData',
datatype: 'json',
colModel:
[{name:'field1',index:'field1',sortable:false,width:25,align:'center',
formatter:'checkbox',formatoptions:{disabled:false},
editable:true,edittype:'checkbox',editoptions:{value:'true:false'},search:false},
{name:'field2',index:'field2',sortable:false,width:25,align:'center',
formatter:'checkbox',formatoptions:{disabled:false},
editable:true,edittype:'checkbox',editoptions:{value:'true:false'},search:false}]
multiselect: true,
multiboxonly: true,
cellEdit: true,
cellsubmit: 'clientArray',
mtype: "POST",
pager: $('#gridPager'),
rowNum: 20,
rowList: [10, 20, 30, 50, 100],
caption: 'caption',
toolbar: [true, "top"],
height: '100%'
});
Brecht
13:13

10/08/2009

Hi!
I implement switching in edit mode inside of ondblClickRow and have no problem. The code can looks like following:
var lastSel = -1;
var grid = jQuery('#list').jqGrid({
...
ondblClickRow: function(id, ri, ci) {
if (id && id !== lastSel) {
if (lastSel>=0) grid.restoreRow(lastSel);
lastSel = id;
}
grid.editRow(id, true, null, null, urlEdit + '/' + id, null,
function(rowid, response) {
...
}
},
onSelectRow: function(id) {
if (id && id !== lastSel) {
if (lastSel >= 0) grid.restoreRow(lastSel);
lastSel = id;
}
},
...
}).navGrid('#pager',...);
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
46 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