GridAIAssistantCommand
Represents a command structure returned by AI services for grid operations. Each command contains the operation type and relevant configuration data.
Definition
Package:@progress/kendo-react-grid
Syntax:
// Sort command example
const sortCommand: GridAIAssistantCommand = {
type: 'GridSort',
sort: { field: 'productName', dir: 'asc' },
message: 'Sorted by Product Name ascending'
};
// Filter command example
const filterCommand: GridAIAssistantCommand = {
type: 'GridFilter',
filter: {
logic: 'and',
filters: [{ field: 'price', operator: 'gte', value: 100 }]
},
message: 'Filtered products with price >= 100'
};
Properties
fileName?
string
The filename for export operations, including the file extension. Used when the AI assistant performs export commands such as PDF generation. Expected data type: string ending with file extension (e.g., '.pdf', '.xlsx').
filter?
CompositeFilterDescriptor
The filter descriptor for filtering operations.
group?
GroupDescriptor | GroupDescriptor[]
The group descriptor for grouping operations.
The highlight descriptor for highlight operations.
id?
string
The unique identifier of the column to resize. Used when type is 'GridColumnResize' to specify which column should be resized.
message?
string
The message describing the operation.
messages?
string[]
The messages describing the operation (alternative to message).
page?
number
The target page number for pagination operations. Used when type is 'GridPage' to navigate to a specific page.
pageSize?
number
The number of items to display per page for pagination operations. Used when type is 'GridPageSize' to change the grid's page size.
position?
number
The target position for column reordering operations. Used when type is 'GridColumnReorder' to specify the new column index.
The select descriptor for selection operations. Used when type is 'GridSelect' to define cell or row selection criteria.
size?
string
The new size value for column resize operations. Specifies the width dimension when resizing grid columns.
sort?
SortDescriptor | SortDescriptor[]
The sort descriptor for sorting operations.
The type of grid operation to perform. Possible values: 'GridSort', 'GridFilter', 'GridGroup', 'GridHighlight', 'GridClearSort', 'GridClearFilter', 'GridClearGroup', 'GridClearHighlight'