setSelectedAt method

void setSelectedAt(
  1. int rowIndex,
  2. bool selected
)

Sets the selection state of the row at rowIndex.

rowIndex is zero-based and refers to the current dataset view, after filtering and sorting. Selection changes repaint bound controls but do not mark data as modified.

Implementation

void setSelectedAt(int rowIndex, bool selected) {
  if (_dataSet._selectionCoordinator.setSelectedAt(rowIndex, selected)) {
    _dataSet._invalidateAdapterAggregateCacheAfterSelectionChange();
    _dataSet.notifyListeners();
  }
}