jQWidgets Forums

jQuery UI Widgets Forums Grid Batch editing documentation?

This topic contains 2 replies, has 2 voices, and was last updated by  admin 3 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Batch editing documentation? #121366

    pk
    Participant

    It seems there’s a new feature called batch editing for the grid, but apart from this post I can’t find any examples or docs about it. Ok, I can set “batcheditable: true”. What next?

    • Do the “OK”, “Cancel” buttons need a grid parameter to appear?
    • How to do trigger a manual “OK” or “Cancel”?
    • What are the events fired when a change happens, when I press OK, or “cancel”?

    Thanks,
    Paul

    Batch editing documentation? #121367

    pk
    Participant

    Ok, to answer my own questions, examining the source code for version 13.1.0:

    – Buttons need “showtoolbar: true” to appear.
    – There isn’t a way to call the function handlers of OK, Cancel via API.
    – There is no specific event fired for “OK”, “cancel”. The grid is just rendered with the new data.
    – There is no way to get just the rows that changed, apart from maybe doing some hacks tied to “rendered” event (grab the grid data before begin edit, grab the grid data after end edit, and get the difference).

    Correct me if I got it wrong.

    I think it’d be useful to have programmatic access to the “OK”, “cancel” buttons and have some events along with it.

    Batch editing documentation? #121368

    admin
    Keymaster

    Hi pk,

    Batch Editing is demonstrated here: https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/batchedit.htm?light. Ok and Cancel are handled by the Grid to either apply or cancel the changes. The feature is documented in the API docs page: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-api.htm

    
    (requires jqxgrid.edit.js)
    
    The batcheditable property enables or disables the Grid batch editing feature. The editable property should be set to true, too.
    
    Code example
    Set the editable property.
    
    $('#jqxGrid').jqxGrid({ batcheditable: true}); 
    Get the editable property.
    
    var editable = $('#jqxGrid').jqxGrid('batcheditable'); 

    In the current version, programmatic access is possible by using selectors by CSS Class – ‘.saveButton’ and ‘.cancelButton’ for the ‘OK’, and ‘Cancel’
    buttons.

    To get the changed rows, you can use the Grid’s addrow, deleterow and upaterow callbacks and put the changes in an array variable.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

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

You must be logged in to reply to this topic.