Skip to content

Selected Property

See Also

GridRow Object | GridSelectedRows Object | GridSelectedRows Add Method | GridSelectedRows DeleteAll Method | Collection of Rows Property | Hide Selected Rows Property | MultipleSelection Property | GridControl's collection of SelectedRows

See Also


Description

Specifies whether the GridRow is currently selected (shaded).

Property Type

Read-write property

Syntax (Visual Basic)

Public Property Selected() As Boolean

Remarks

A GridRow is selected when the user clicks on the row, or when the Add method is used. Selected rows will appear shaded.

You can select multiple rows at a time by holding down the Shift or Ctrl keys while you click on the rows. Multiple row selection can be enabled or disabled.

Selected rows can be retrieved through the GridControl's collection of SelectedRows.

Example

Selecting a GridRow via the Selected Property (Visual Basic)

This sample illustrates how to make a Row(s) selected via code using the Selected property.

' This will cause the 4th and 7th (Row index starts at zero) rows in the GridControl to become selected.  
' The rows will appear shaded (grey) indicating that the rows are selected.  

wndGridControl.Rows(3).Selected = True  
wndGridControl.Rows(6).Selected = True

See Also

GridRow Object | GridSelectedRows Object | GridSelectedRows Add Method | GridSelectedRows DeleteAll Method | Collection of Rows Property | Hide Selected Rows Property | MultipleSelection Property | GridControl's collection of SelectedRows

Additional Examples


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.