Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Scrolling And Focusing Rows

  • 2 minutes to read

#Scrolling Rows

If the number of rows is too large to fit into the grid control the user can scroll the grid vertically using the vertical scrollbar to access the desired row. Or you can make the desired row available for the user programmatically.

Use the TcxCustomRow.MakeVisible method to scroll vertically.

When invoked on the child row object this method expands its parent(s) that were collapsed and scrolls the view to make this row visible within the vertical grid boundaries.

Another way to scroll the grid vertically is assigning the TcxCustomVerticalGrid.TopVisibleRowIndex property the TcxCustomRow.AbsoluteIndex desired row property value. This property doesn’t cause the desired row’s parents to expand.

Delphi
//...
//expand the Price row parents and scroll the vertical grid
fldPrice.MakeVisible;
// or
// just scroll the vertical grid
cxDBVerticalGrid.TopVisibleRowIndex := fldPrice.AbsoluteIndex;

#Moving Focus Between Rows

The ExpressVerticalGrid enables users to move focus from row to row using either the mouse or keyboard. You can facilitate the user to move focus to the desired row by assigning the TcxCustomVerticalGrid.FocusedRow property to the desired row object reference.

Delphi
//...
// make sure the value of the fldPrice.Options.Focusing is True and move focus to the Price row
cxDBVerticalGrid.FocusedRow := fldPrice;

Note

the TcxCustomRow.Options.Focusing property should be set to True. Otherwise the desired row doesn’t get focus.