DataRequestEvent
Defines event arguments for custom data service requests in the Data Grid component. Provides parameters for querying data from a remote or custom data source, including pagination, filtering, sorting, and searching. Used to configure and execute data retrieval operations for the grid.
Props
The following table outlines the props for the DataRequestEvent:
| Name | Type | Default | Description |
|---|---|---|---|
| action | null | Contains details about the grid action (e.g., paging, grouping, filtering, sorting, searching) that triggered the request. Provides context about the user or programmatic action driving the data query. Used to handle specific action-related logic in the data service. | |
| aggregates | Aggregates[] | [ ] | Contains an array of aggregation criteria for summarizing data in the grid. Specifies functions like sum, average, min, max, or count to be applied on specific fields. Used to compute and display aggregated values in the grid. |
| dataSource | Function | null | Specifies a callback function to handle the data service response. Executes with the query result when a specific request type requires custom handling. Used for scenarios like filter choice requests that need direct response processing. |
| distinct | [ ] | Contains an array of filter criteria for distinct value queries. Specifies conditions to filter data when calculating distinct counts. Used alongside distinctCounts to apply the same filter predicates when fetching distinct values. | |
| distinctCounts | boolean | false | Indicates whether the data service should return distinct counts for the result set. When true, requires the service to calculate unique value counts alongside the data. Used for scenarios requiring unique record counting or deduplication. |
| name | string | - | Specifies the name of the action associated with the data request. |
| requestType | string | null | Specifies the type of request being made to the data service. Indicates the context of the data request, such as 'filterChoiceRequest' for filter dropdown data. Used to determine how the response should be processed and applied to the grid. |
| requiresCounts | boolean | false | Indicates whether the data service should return both records and the total record count. When true, requires the service to include the total count for pagination. |
| search | [ ] | Contains an array of search criteria for full-text or field-specific searches. Specifies search terms or conditions to filter data across one or more fields. Used to implement search functionality within the grid. | |
| select | string[] | [ ] | Contains an array of field names to retrieve from the data source. Specifies which columns or properties should be included in the query result. Used to optimize data retrieval by selecting only necessary fields. |
| skip | number | 0 | Specifies the number of records to skip in the data source for pagination. Used to navigate to specific pages or subsets of data. |
| sort | [ ] | Contains an array of sort criteria defining the fields and directions for sorting. Specifies how data should be ordered, such as ascending or descending by column. Used to apply sorting to the grid’s data based on user or programmatic input. | |
| take | number | 12 | Specifies the number of records to retrieve per page from the data source. Used to limit the data fetched in a single request. |
| where | [ ] | Contains an array of filter criteria for querying the data source. Specifies conditions to filter data, such as equality or range checks on specific fields. Used to apply user-defined or programmatic filters to the grid’s data. |