jQWidgets Forums

jQuery UI Widgets Forums Grid How to Exit Grid Edit Mode Programmatically

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • How to Exit Grid Edit Mode Programmatically #7479

    slsu90
    Member

    Hi,

    Is it possible to exit grid edit mode programmatically? I understand that we can use method ‘endcelledit’ for quitting cell editing for a selected cell but is there one for the entire grid instead?

    Thanks
    slsu90

    How to Exit Grid Edit Mode Programmatically #7511

    Peter Stoev
    Keymaster

    Hi slsu90,

    You will have to use the ‘endcelledit’ method and pass the cell’s row, column datafield and a parameter that determines whether the changes will be saved or not.

    $("#jqxgrid").jqxGrid('endcelledit', 0, "firstname", false);

    To get the edit cell’s row and column, use can use the pair of events – ‘cellbeginedit’ and ‘cellendedit’

    $("#jqxgrid").bind('cellbeginedit', function (event) {
    var column = args.datafield;
    var row = args.rowindex;
    var value = args.value;
    });

    You can use the row and column when you call the ‘endcelledit’ method.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.