Selected Property
The Selected property allows you to get or set a flag indicating whether a row is selected. This property is primarily intended for use in the presentation layer of applications. Typical use cases include UI selection, highlighting, or interaction state in data-bound controls such as grids, lists, or tree views.
The Selected property does not affect the row’s
DataRowState, change tracking, or persistence behavior.
It is not considered part of the row’s data and is ignored by
AcceptChanges, RejectChanges, and merge operations.
Namespace: PocoDataSet.Data
Assembly: PocoDataSet.Data.dll
// 1. Create an empty data set
IDataSet dataSet = DataSetFactory.CreateDataSet();
// 2. Create an empty data table
IDataTable departmentDataTable = dataSet.AddNewTable("Department");
departmentDataTable.AddColumn("Id", DataTypeNames.INT32);
departmentDataTable.AddColumn("Name", DataTypeNames.STRING);
// 3. Create a new row by AddNewRow method on data table, the row state is Added
IDataRow departmentDataRow = departmentDataTable.AddNewRow();
// 4. Select the row by setting the Selected property to true
departmentDataRow.Selected = true;
// 5. Verify that row is selected, expected true
bool departmentDataRowSelected = departmentDataRow.Selected;
Table of Content POCO DataSet API References POCO DataSet Types DataRow Members
Business Process Programming in .Net
© 2004–2026 Laskarzhevsky Software Inc.
Unless otherwise noted, the content of this website is licensed under the
Creative Commons Attribution 4.0 International License (CC BY 4.0).
Code examples are provided under the MIT License.
You are free to share and adapt the material provided that appropriate
credit is given and any modifications are clearly indicated.
The information provided on this website is for educational purposes only.
The author and publisher make no warranties regarding the completeness
or suitability of the information and are not responsible for any damages
resulting from its use.