GridView.MakeRowVisible(Int32, Boolean) Method

Makes the specified row visible on screen. Allows you to invalidate the row, if required.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.2.dll


public void MakeRowVisible(
    int rowHandle,
    bool invalidate
Public Sub MakeRowVisible(
    rowHandle As Integer,
    invalidate As Boolean


Name Type Description
rowHandle Int32

An integer value specifying the handle of the row that should be made visible.

invalidate Boolean

true if the row needs to be invalidated; otherwise, false.


The MakeRowVisible method's functionality depends on the current visibility of the specified row. So, the following three cases can occur:

  • If the specified row is completely visible on screen, the method does nothing.
  • If the row is partially visible, the method scrolls the minimum number of rows required to make the row completely visible. Note that rows can be partially visible only when they are at the bottom of the View. Thus, as a result, the View is scrolled down and the row is located near the View's bottom edge.
  • If the row is not visible on screen, the View scrolls vertically and expands group rows containing the hidden row (if required). Note that in this case, the MakeRowVisible method attempts to make the specified row the top visible row.

Note: when focusing a row using the ColumnView.FocusedRowHandle property, the View automatically makes the specified row visible on screen. The MakeRowVisible method is used for this purpose. So, you don't have to use the MakeRowVisible method if you need to focus the target row. Simply assign the desired row handle to the ColumnView.FocusedRowHandle property.


Calling the MakeRowVisible method before a grid control is completely initialized will have no effect. Before calling this method on loading the form, call the GridControl.ForceInitialize method. See this method to learn more.


Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the MakeRowVisible member must not be invoked for these Views. The MakeRowVisible member can only be used with real Views that are displayed within the Grid Control. The real Views with which an end-user interacts at runtime can be accessed using the following methods.

See Also