Skip to main content

DataGridView.AllowInitiallySelectedRow Property

Gets or sets whether the first row is selected when the view is displayed on-screen for the first time.

Namespace: DevExpress.XamarinForms.DataGrid

Assembly: DevExpress.XamarinForms.Grid.dll

NuGet Package: DevExpress.XamarinForms.Grid

Declaration

[XtraSerializableProperty]
public bool AllowInitiallySelectedRow { get; set; }

Property Value

Type Description
Boolean

true if the first row is selected when the view is displayed on-screen for the first time.

Remarks

Set the AllowInitiallySelectedRow property to false to prevent the first row from being selected when the view is displayed on-screen for the first time. When a user taps a data row in the grid, this row becomes selected.

Grid Data Rows

To obtain a handle of the grid’s selected data row, use the SelectedRowHandle property. The SelectedItem property returns an object that specifies a data source record to which the row selected in the grid corresponds. After the grid’s selection is changed, the DataGridView.SelectionChanged event occurs.

To prevent users from selecting rows, set the SelectionMode property to SelectionMode.None.

See Also