GridView.MakeColumnVisible(GridColumn) Method
Makes the specified column visible on screen.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
column | GridColumn | A GridColumn object (or descendant) representing the column that should be made visible. |
Remarks
The MakeColumnVisible method does nothing in the following cases:
- the specified column is hidden (its GridColumn.VisibleIndex property returns -1);
- the specified column is completely visible on screen;
- the column is anchored to a View edge (its GridColumn.Fixed property value is not FixedStyle.None) or its owning band is anchored to a View edge (the band’s GridBand.Fixed property value is not FixedStyle.None).
In other cases, the method scrolls the View the minimum amount required to make the column completely visible on screen.
Note: when assigning a column to the ColumnView.FocusedColumn property, the specified column is automatically made visible using the MakeColumnVisible method. Thus, if you need to make a column visible and focus it, simply assign the desired column to the ColumnView.FocusedColumn property. The MakeColumnVisible method should be used when you don’t need to move focus to the target column.
Note
Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the MakeColumnVisible member must not be invoked for these Views. The MakeColumnVisible member can only be used with Views that display real data within the Grid Control. Use the following methods to access these Views with which an end user interacts at runtime.
- GridControl.MainView - returns the top most View in a grid;
- GridControl.FocusedView - returns the focused View;
- GridControl.DefaultView - returns the currently maximized View;
- the sender parameter of View specific events;
- GridView.GetDetailView - returns a detail clone View for a specific master row.