jQuery UI Widgets › Forums › Grid › On cellendedit column aggregate does not getting effect
Tagged: aggregate, aggregates, cellendedit, computed column, grid, jqxgrid
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 10 years, 5 months ago.
-
Author
-
Hi,
i have qty col, on which i have applied cellendedit its update the cell value but not updating its aggregate value.
How can i update, plz help me.
Thanks
Please share a JS Editor or a JSFiddle example demonstrating the issue you experience.
If you have a Computed Column, more information about implementing aggregates can be found in the following forum post: http://www.jqwidgets.com/community/topic/computed-column-that-will-sort-and-use-the-cellclass/#post-58260.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/$(“#jqxgrid”).bind(‘cellendedit’, function (event) {
var args = event.args;
var columnDataField = args.datafield;
var rowIndex = args.rowindex;
var cellValue = args.value;
var oldValue = args.oldvalue;
//alert(‘b4 calc’);
if (columnDataField == “Quantity”) {
//alert(‘InCal’);
var qty = cellValue;
var updateTP = null;
var UP = $(“#jqxgrid”).jqxGrid(‘getcellvalue’, rowIndex, ‘UnitPrice’);
if (qty != null) {
//alert(‘Qty: ‘ + qty + ‘,UP: ‘ + UP);
updateTP = qty * UP;
$(“#jqxgrid”).jqxGrid(‘setcellvalue’, rowIndex, ‘TotalPrice’, updateTP);
UpdateDataToSave();
}
}
});Your code seems correct. Maybe the issue originates in the UpdateDataToSave function?
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.