GridUtilitiesV2 is a mixin that provides the management logic for the "List" control. Implemented in the Terrasoft.configuration.mixins.GridUtilities class of the NUI package. Learn more about the “List” control in the user documentation: Work with record lists.
The mixin lets you:
- Subscribe to messages.
- Load data.
-
Manage the list:
- Select records (search for active records).
- Add, delete, edit records.
- Set the filters.
- Sort the records.
- Export records to a file.
- Check the access permissions to the list records.
Methods
Subscribes to events.
Clears event subscriptions.
Loads the list data.
Prepares the view model before the data is loaded.
Prepares the view model after the data is loaded.
Handles data load events. Executed when the server returns data.
{Object} response | The result of database data selection. |
Adds the collection of new elements to the collection of the list.
{Object} dataCollection | The collection of new elements. |
{Object} options | Addition parameters. |
Initializes the query instance settings (pagination, hierarchy).
{Terrasoft. |
The query in which to initialize the relevant settings. |
Initializes the sorting columns.
{Terrasoft. |
The query in which to initialize the relevant settings. |
Modifies the data collection before loading it to the list.
{Object} collection | Collection of list elements. |
Returns the filters applied to the schema. Overload the method in the inheritors.
Exports the list contents to a file.
Sorts the list.
{String} tag | Specifies how to sort the list. |
Initiates deletion of the selected records.
Checks whether the record can be deleted.
{Array} items | IDs of selected records. |
{Function} callback | The callback function. |
{Object} scope | The method execution context. |
Deletes the record after the user confirms the deletion.
Returns the selected list records.
Removes the deleted records from the list.
{Array} records | The deleted records. |
Reloads the list.