Forum
19:01
26/05/2011
First off jqGrid is a fantastic plugin. Thanks
——
I have a project where the users want to use inline editing because of its convenience to update some data.
However, for certain rows I need certain columns to be not editable.
So my feature request is simply I want to add a cell class —-call it "not-editable-cell" so that cell within a specific row is display only when the row is edited.
So my code would look something like:
First off in my colModel would be
{name:'lockRowCells', hidden: true},
{name:'event', index:'event', width:100, align:"center",
resizable: true, editable:true, sortable: false,
edittype: "select",
editoptions:{value:":-Select-;01:Some Event Name;"},
lockcell: true},
lockcell is a custom attribute I add for my project.
Then
onSelectRow: function(id){
var columns = $(gridElementId).jqGrid('getGridParam',
'colModel');
var row = $(gridElementId).jqGrid('getRowData', id);
if (row.lockRowCells)
$.each(columns, function() {
if (this.lockcell) {
$(gridElementId).
jqGrid('setCell', id, this.name, "",
'not-editable-cell');
}
});
$(gridElementId).jqGrid('editRow', id);
}
I would still utilize not-editable-row if needed. And I prefer inline editing vs
cell editing since I delete rows in the grid as well.
Thank you
Most Users Ever Online: 715
Currently Online:
58 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