Hello again,
Once again I'm in some need for asistance, this time with the setCell() method. I'll jump straight in with the script for my grid.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
jQuery(document).ready(function(){<br /> jQuery('#Algemeen').jqGrid({<br /> hidegrid: false,<br /> width: 860,<br /> height: 500,<br /> xmlReader: {<br /> root: 'Grid',<br /> row: 'Rij',<br /> page: 'Grid>Pagina',<br /> total: 'Grid>Paginas',<br /> records: 'Grid>Records',<br /> repeatitems: false,<br /> id: 'AKID'<br /> },<br /> <br /> url: 'functions/JqGridData.php',<br /> datatype: 'xml',<br /> mtype: 'GET',<br /> colNames: ['Del', 'IMG', 'ID', 'IMGURL'],<br /> colModel: [<br /> {name: 'Del', index:'Acties', width:10, sortable:false, align:'center'},<br /> {name: 'IMG', index:'Image', width:10, sortable:false, align:'center'},<br /> {name: 'AKID', index: 'AKID', width: 25, editable: true, editoptions:{size:2.5, readonly:false}},<br /> {name: 'IMGURL', index: 'IMGURL', width: 70, editable: true, editoptions:{size:7, readonly:false}},],<br /> gridview: true,<br /> gridComplete: function() {<br /> var ids = jQuery('#Algemeen').jqGrid('getDataIDs');<br /> for(var i=0;i < ids.length;i++) {<br /> im = "<img src='layout/img/icons/browse_klein.png' style='cursor:pointer;' onclick="jQuery.customMethod();" />";<br /> jQuery('#Algemeen').jqGrid('setRowData',ids<i>,{IMG:im});<br /> }<br /> },<br /> ...<br />});<br /> </i> |
I'm trying to edit a column from a onclick event on a button.jQuery('#Algemeen').setCell('row', 'column', 'someRandomText', undefined, undefined, false);
This seems to work, the value of the desired column changes to the expected value. But once I try to save the value, undefined is being send to the database, which obviously isn't what I wanted. I've tried several things but none seem to fix this issue. What am I doing wrong here?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top