jQWidgets Forums

jQuery UI Widgets Forums Grid Writing conditions for Remove button

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 8 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Writing conditions for Remove button #89547

    walker1234
    Participant

    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

    Writing conditions for Remove button #89555

    Hristo
    Participant

    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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Writing conditions for Remove button #89563

    walker1234
    Participant

    Hi 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?

    Writing conditions for Remove button #89589

    Hristo
    Participant

    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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.