jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid-event not getting fired
This topic contains 2 replies, has 3 voices, and was last updated by mallepaddi 11 years, 4 months ago.
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
Hi,
‘valuechanging’ event doesn’t fire in the below code,
$("#productGrid").jqxGrid ({ width: 960, height: 350, source: dataAdapter, theme: 'ui-sunny', pageable: true, sortable: true, filterable: true, columnsresize: true, autoshowfiltericon: true, enabletooltips: true, editable: true, groupable: true, columnsreorder: true, selectionmode: 'singlerow', columns: [ { text: 'OrderDetailId', datafield: 'OrderDetailId', hidden: false, width: 80 }, { text: 'OrderId', datafield: 'OrderId', hidden: false, width: 60 }, { text: 'Code', datafield: 'ProductCode', editable: false, width: 130 }, { text: 'Description', datafield: 'ProductDesc', editable: false, width: 300 }, { text: 'Available Qty', datafield: 'StockQty', editable: false, width: 80 }, { text: 'Order Qty', datafield: 'Quantity', editable: true, width: 70, <strong> cellvaluechanging: function (row, datafield, columntype, oldvalue, newvalue) { var price; StockQty = $('#productGrid').jqxGrid('getcellvalue', row, "StockQty") if (args.newvalue > (StockQty + args.oldvalue)) { alert("Qty can't be > Available Quantity, original value is reset!!"); return oldvalue; } else if (newvalue <= (StockQty + oldvalue)) { alert("Inside ......else "); price = $('#productGrid').jqxGrid('getcellvalue', row, "SellPrice") var psq = $('#productGrid').jqxGrid('getcellvalue', row, "PendingShipQty") $('#productGrid').jqxGrid('setcellvalue', row, "Quantity", newvalue); $('#productGrid').jqxGrid('setcellvalue', row, "StockQty", StockQty - (newvalue - oldvalue)); $('#productGrid').jqxGrid('setcellvalue', row, "AmendedQty", 10); $('#productGrid').jqxGrid('setcellvalue', row, "ItemValue", newvalue * price); $('#productGrid').jqxGrid('setcellvalue', row, "PendingShipQty", (psq - (oldvalue - newvalue))); Tqty -= oldvalue; Tqty += newvalue; Tamt -= (oldvalue * price); Tamt += (newvalue * price); $('#log2').html('Order Qty:' + Tqty); $('#log1').html('Order Val:' + Tamt); return newvalue; } } },</strong> { text: 'Price', datafield: 'SellPrice', editable: false, width: 70 }, { text: 'Item Value', datafield: 'ItemValue', editable: false, width: 90 }, { text: 'Pend Shp Qty', datafield: 'PendingShipQty', editable: false, width: 80 }, { text: 'Amended Qty', datafield: 'AmendedQty', editable: false, width: 80 } ] })
Thanks,
Keshavan
Hi Keshavan
Unfortunately, the provided information is not sufficient for testing your scenario. Please, provide a sample which we can run and test with. In addition, please make sure that your issue is relevant to the current version of jQWidgets which is 3.2.1.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHI
why it was like this ..
“strong” keyword before cellvaluechanging: …. ?
Thanks
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.