ColumnView.GetNearestCanFocusedColumn(GridColumn) Method

Returns the nearest column to the specified one that can be focused.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public GridColumn GetNearestCanFocusedColumn(
    GridColumn column
)
Public Function GetNearestCanFocusedColumn(
    column As GridColumn
) As GridColumn

Parameters

Name Type Description
column GridColumn

A GridColumn object representing the column which will be used as the search point.

Returns

Type Description
GridColumn

A GridColumn object representing the nearest column that can be focused.

Remarks

The GetNearestCanFocusedColumn method returns the nearest column to the one specified by the parameter that can be focused by an end-user. If the column is the leftmost visible column, this method returns the next column that can be focused. Otherwise, this method searches only to the left of the specified column.

If the column specified by the column parameter is hidden, the GetNearestCanFocusedColumn method returns the first visible column that can be focused by an end-user. A column can be focused if its OptionsColumn.AllowFocus option is enabled.

The GetNearestCanFocusedColumn method returns null (Nothing in Visual Basic) in the cases listed below:

  • There are no visible columns within the View. In this case the View's ColumnView.VisibleColumns collection is empty.
  • There are no columns that can be focused.

This method returns the column specified by the parameter if it is the only visible or focusable column within the View.

Please refer to the Focusing Cells topic for more information.

See Also