Forum
Topic RSS
12:51
Moderators
30/10/2007
OfflineHello,
Try to use inline edit. Get all the id of the grid, then loop throught these with editRow method.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
20:11
I need your help one more time, to solve an event related problem.
This is the code that I have now :
url: '<?php echo base_url().$this->lang->lang().'/basket/show/update'; ?>',
datatype: 'xml',
mtype: 'POST',
height: 'auto',
colNames: ['Image','Name','Qty','Stock', 'HT','TTC'],
colModel : [
{
name:'image',
index:'image',
width:100,
editable: false,
sortable: false,
align: 'center'
},
{
name:'name',
index:'name',
width:200,
editable: false,
sortable: false
},
{
name:'quantity',
index:'quantity',
width:55,
editable: true,
sortable: false,
align: 'center', editrules:{number:true}
},
{
name:'stock',
index:'stock',
width:50,
editable: false,
sortable: false,
align: 'center'
},
{
name:'wotax',
index:'wotax',
width:100,
editable: false,
sortable: false,
align: 'right',
formatter:'currency',
formatoptions: {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, suffix: " EUR"}
},
{
name:'wtax',
index:'wtax',
width:100,
editable: false,
sortable: false,
align: 'right',
formatter:'currency',
formatoptions:{decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, suffix: " EUR"}}
],
cellEdit: true,
cellsubmit: 'remote',
cellurl: '<?php echo base_url().$this->lang->lang().'/basket/edit' ?>',
afterSaveCell: function(id, cellname, value, iRow, iCol) {
alert('heya');
jQuery("#cart").jqGrid('trigger', 'reloadGrid' );
},
gridComplete: function(xhd){
var dataIDs = jQuery('#cart').getDataIDs();
for (var index in dataIDs) {
jQuery('#cart').editRow(dataIDs[index],false);
}
}
});
I am trying to reload the grid after the user edits a cell, I am using afterSaveCell to do exactly that, but nothing happens, why ?
18:13
Updated the code, it should be correct according to the documentation.
This code is based in part in the code that is on the examples page : http://www.trirand.com/blog/jq.....qgrid.html , more precisely at "New in version 3.3 > Cell editing".
...
BUT, it's still not working !
I have another question regarding the example in the above page : in the source code they include the script grid.celledit.js, do we still need to included in the last version, or it's already included in the jquery.jqGrid.min.js version 3.6.
18:48
Moderators
30/10/2007
OfflineHello,
You have a mixed cellEdit and inline edit - they can not exist together.
In case you use inline edit
http://www.trirand.com/jqgridw.....ne_editing
maybe you will need to use aftersavefunc
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 994
Currently Online:
505 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
Log In
Home