Forum



14:07

25/02/2011

Hi,
I am trying to have a little custom delete button for each row. I have tried (every variation I could find / think of):
$('#emailsGrid')
.jqGrid(
{
datatype : "local",
colNames : [ 'Email', 'use1', 'use2',
'use3' ],
colModel : [ {
name : 'email',
index : 'email',
editable : false,
width : 200
}, {
name : 'use1',
index : 'use1',
editable : true,
edittype : 'checkbox',
editoptions : {
value : "True:False"
},
formatter : "checkbox",
formatoptions : {
disabled : false
},
width : 60
}, {
name : 'use2',
index : 'use2',
editable : true,
edittype : 'checkbox',
editoptions : {
value : "True:False"
},
formatter : "checkbox",
formatoptions : {
disabled : false
},
width : 60
}, {
name : 'use3',
index : 'use3',
editable : true,
edittype : 'checkbox',
editoptions : {
value : "True:False"
},
formatter : "checkbox",
formatoptions : {
disabled : false
},
width : 60
} ],
gridComplete : function() {
var ids = $('#comz-CMR-emailsGrid').jqGrid(
'getDataIDs');
for ( var i = 0; i < ids.length; i++) {
var id = ids[i];
delBut = "<input style='height:22px;width:20px;' type='button' value='E' onclick="$('#comz-CMR-emailsGrid').delRowData('"
+ id + "');" />";
$('#emailsGrid').jqGrid(
'setRowData', id, {
act : delBut
});
}
}
},
width : 500,
height : 100,
cellEdit : true,
editurl : "server.php"
});
But no button ever shows? What have I done wrong?
Thanks,
lilalfyalien
Most Users Ever Online: 715
Currently Online:
59 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