jQWidgets Forums
jQuery UI Widgets › Forums › Grid › CELLENDEDIT not release cell after edit
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 10 years ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
Hi,
I have cellendedit function to edit cell,
but after edit its not releasing that particular cell nor allowing me to add other rows
not to do any other thing on the page.CODE
$("#jqxgrid_eq").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" || columnDataField == "Days" || columnDataField == "Rate" || columnDataField == "Discount") { //alert(columnDataField); var qty, rate, days, dis, discount = 0; var GP, NP = null; if (columnDataField == "Quantity") { qty = cellValue; rate = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Rate'); days = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Days'); dis = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Discount'); //alert('Qty: ' + qty + ',rt: ' + rate + ',dy :' + days + ', ds :' + dis); } else if (columnDataField == "Days") { days = cellValue; qty = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Quantity'); rate = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Rate'); dis = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Discount'); //alert('Qty: ' + qty + ',rt: ' + rate + ',dy :' + days + ', ds :' + dis); } else if (columnDataField == "Rate") { rate = cellValue; qty = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Quantity'); days = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Days'); dis = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Discount'); //alert('Qty: ' + qty + ',rt: ' + rate + ',dy :' + days + ', ds :' + dis); } else if (columnDataField == "Discount") { dis = cellValue; qty = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Quantity'); days = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Days'); rate = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'Rate'); //alert('Qty: ' + qty + ',rt: ' + rate + ',dy :' + days + ', ds :' + dis); } if (dis > 0 && dis != '-' && dis != null) { discount = dis; } // up = $("#jqxgrid_eq").jqxGrid('getcellvalue', rowIndex, 'UnitPrice'); if (qty > 0 && days > 0 && rate > 0) { GP = qty * days * rate; //alert(GP); $("#jqxgrid_eq").jqxGrid('setcellvalue', rowIndex, 'GP', GP); if (discount > 0) { //alert(discount); NP = ((GP) - (GP * discount / 100)) $("#jqxgrid_eq").jqxGrid('setcellvalue', rowIndex, 'NetPrice', NP); } else { $("#jqxgrid_eq").jqxGrid('setcellvalue', rowIndex, 'NetPrice', GP); } } } });
can any one plz help me.
Thanks
Hi subhani.029,
cellendedit is an Event which is raised when an active editor is removed and the Grid saves or cancels the editing. The event is raised always for any cell which is in edit mode.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.