DataGridModel QML Type
List model for tabular data in DataGrid. More...
| Import Statement: | import FluentUI.impl 1.0 |
Properties
- count : int
- sourceData : list
Signals
- void countChanged()
Methods
- void append(var data)
- void clear()
- var get(int index)
- void insert(int index, var data)
- void move(int from, int to, int n)
- void remove(int index, int count)
- void removeItems(list indices)
- void selectRange(var selectionModel, int startRow, int endRow)
- void set(int index, var data)
Detailed Description
The DataGridModel type provides a list-based data model for use with the DataGrid control. It supports adding, inserting, removing, and moving rows, as well as range selection.
Property Documentation
count : int
This read-only property holds the number of rows in the model.
sourceData : list
The source data list. Each element typically represents a row of data in the grid.
Signal Documentation
void countChanged()
Emitted when the number of rows in the model changes.
Note: The corresponding handler is onCountChanged.
Method Documentation
void append(var data)
Appends a new row with the given data to the end of the model.
void clear()
Removes all rows from the model.
var get(int index)
Returns the data at the specified index.
void insert(int index, var data)
Inserts a new row with the given data at the specified index.
void move(int from, int to, int n)
Moves n rows from the from index to the to index.
void remove(int index, int count)
Removes count rows starting from the specified index.
void removeItems(list indices)
Removes the rows at the specified indices from the model.
void selectRange(var selectionModel, int startRow, int endRow)
Selects the range of rows from startRow to endRow using the given selectionModel.
void set(int index, var data)
Replaces the data at the specified index with the given data.