Custom properties: // retrieve grid instance from element data var grid = $("#grid").data("JSGrid"); // create grid with the constructor var grid = new js Grid. edited Item is the changed item to pass to // update currently editing row $("#grid")Grid("update Item"); // update currently editing row with specified data $("#grid")Grid("update Item", ); // update specified item with particular data (row Dom Node or row j Query Element can be used instead of item reference) $("#grid")Grid("update Item", item, ).done(function() ); Set current locale of all grids.
Grid($("#grid"), ); // call method directly grid.method Name(param1, param2); // delete row by item reference $("#grid")Grid("delete Item", item); // delete row by j Query Element $("#grid")Grid("delete Item", $(".specific-row")); // delete row by Dom Node $("#grid")Grid("delete Item", row Node);// edit row by item reference $("#grid")Grid("edit Item", item); // edit row by j Query Element $("#grid")Grid("edit Item", $(".specific-row")); // edit row by Dom Node $("#grid")Grid("edit Item", row Node); Gets or sets the value of a field option. locale Name|locale Config is the name of the supported locale (see available locales or a custom localization config.
Created a Dynamic Details View (basically adding bound fields to Details View fields) and I'm having trouble using On Item Updating command.
Grid with filtering, editing, inserting, deleting, sorting and paging. This demo shows how to implement editing and inserting data to the grid with external details dialog. The j Query Validation Plugin is used for form validation. Find how to set locale and register custom locale in the Localization section. It helps to reduce data loading time and of course necessary for large data sources. Cell content of every column can be customized with item Template, header Template, filter Template and insert Template functions specified in field config. The API methods update Item, insert Item and delete Item allow editing from outside of the grid with ease.Specific field options depends on concrete field type. A boolean value specifies whether editing is allowed. A boolean value specifies whether to show inserting row or not.Starting v1.5 js Grid supports standard Java Script Promise/A, earlier versions support only j Query. For instance the controller for typical REST service might look like: . If deletion is asynchronous, method should return j Query promise that will be resolved when deletion is completed. allows to specify a custom load strategy to customize the behavior of the grid.
If no item is returned, updating item will be used as updated item. The easiest way to do it is to inherit from existing strategy.
A boolean value specifies whether data is displayed by pages.
A boolean value specifies whether to load data by page. A boolean value specifying whether to ask user to confirm item deletion.
The function accepts a single argument with the following structure: Control field renders delete and editing buttons in data row, search and add buttons in filter and inserting row accordingly. Returns j Query promise resolved when update is completed.
It also renders button switching between filtering and searching in header row. The value should be in range from 1 to [total amount of pages]. item|$row|row Node is the reference to the item or the row j Query Element or the row Dom Node.
Sorting can be done not only with column header interaction, but also with sort method. All components of the grid can be easily configured. This example shows how to implement batch deleting with custom field for selecting items. This example shows how to implement it using j Query UI Sortable plugin.