Skip to content

FocusedRow Property

Description

Returns a reference to the row that currently has focus in the GridControl.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property FocusedRow() As [GridRow](XtremeGridControl~GridRow.md)

Remarks

Only one row can have focus at a time; the focused row will have a bold rectangle placed around the entire row indicating which row has focus.

A focused row is not the same as a selected row. Multiple rows can be selected, but only one can have focus.

Example

FocusedRow Sample (Visual Basic)

This sample illustrates one way to use the FocusedRow property. This sample uses the FocusedRow to access and change the properties of the row.

' This event occurs each time the selection changes  
Private Sub wndGridControl_SelectionChanged()  
    ' If the focused row's Tag value is "UnRead" then execute this code  
    If wndGridControl.FocusedRow.Record(0).Tag = "UnRead" Then  
        ' Remove the bold font of the focus row/record  
        wndGridControl.FocusedRow.Record(0).Bold = False  
        ' Replace the row's Tag as being "Read"  
        wndGridControl.FocusedRow.Record(0).Tag = "Read"  
    End If  
End Sub

See Also


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