jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Writing conditions for Remove button
Tagged: angular grid, angular2 grid, bootstrap grid, javascript grid, jquery grid, jqwidgets grid, jqxgrid, typescript grid
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 8 years, 6 months ago.
-
Author
-
I am referring to this post.Just like the “Save” button functionality updates the row with the following code which is working for me:
$("#Save").click(function () { if (editrow >= 0) { var row = { firstname: $("#firstName").val(), lastname: $("#lastName").val(), productname: $("#product").val(), quantity: parseInt($("#quantity").jqxNumberInput('decimal')), price: parseFloat($("#price").jqxNumberInput('decimal')) }; $('#jqxgrid').jqxGrid('updaterow', editrow, row); $("#popupWindow").jqxWindow('hide'); } });
I have a “Remove” button also in the edit popup and I want to remove that particular row when a user clicks on the button. Could anyone tell me how can I implement those changes in the following code ( the code for remove below is same as save button right now )?
$("#Remove").click(function () { if (editrow >= 0) { var row = { firstname: $("#firstName").val(), lastname: $("#lastName").val(), productname: $("#product").val(), quantity: parseInt($("#quantity").jqxNumberInput('decimal')), price: parseFloat($("#price").jqxNumberInput('decimal')) }; $('#jqxgrid').jqxGrid('updaterow', editrow, row); $("#popupWindow").jqxWindow('hide'); } });
Thanks
Hello walker1234,
Please, take a look at this demo (our ‘Showcase Demos’ section):
http://www.jqwidgets.com/jquery-widgets-demo/demos/interactivedemos/fitnesstracker/
I would like to focus your attention to the Grid with meal info in “Meal Summary” paragraph.
You could look at deleteSelectedRow function concretely.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Histro,
I couldn’t find the source code for the demo here :
view-source:http://www.jqwidgets.com/jquery-widgets-demo/demos/interactivedemos/fitnesstracker/
Could you share the source code for the same as I am unable to view the deleteSelectedRow method?
Hello walker1234,
You could find all files about this demo on following way – when downloading our library there is “demos” folder.
In this folder will find folder “interactivedemos” and in is this particular demo (“fitnesstracker”) with its files.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.