Skip to main content
A newer version of this page is available. .

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.v19.2.dll

Declaration

public void MakeRowVisible(
    int rowHandle,
    bool invalidate
)

Parameters

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.

Remarks

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.

Note

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.

Note

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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the MakeRowVisible(Int32, Boolean) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also