NextVisualBlock Property
Description
Specifies the number of columns that will be hidden when the column is expanded.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property NextVisualBlock() As Long
Remarks
The PlusMinus property specifies whether the column has an arrow icon in the column header that can be clicked to expand the column. When using PlusMinus, you also need to set the NextVisualBlock property. The NextVisualBlock property specifies how many columns are hidden to the right of the column with PlusMinus = True when the arrow button is pressed. When the columns are hidden, the column with PlusMinus = True will expand to the width of the hidden columns.
TIP: Use negative numbers to expand/collapse in the opposite direction. For example, NextVisualBlock = -3.
For example, let's say PlusMinus = True and NextVisualBlock = 3. In this case, when the expand arrow is clicked, the 3 columns to the right will be hidden, and the column with the expand arrow button will expand to the combined width of the 3 hidden columns.
This can be used to save space. You can allow column widths to be small to fully display data, but at the same time allow that data to be fully visible with the click of a button.
The VisibleIndex is the index of the column visually; this is only needed if a column is expanded, and this will apply to all columns after the column that is expanded.
The OldVisibleIndex is the old index of the column; this is only needed if a column is expanded, and this will apply to all columns after the column that is expanded.
The ColumnPlusMinusSign property can be used to display a "+/-" button instead of the arrow button.
The Expanded state can be used to determine if the column is expanded.
Example
Set Column = wndGridControl.Columns.Add(COLUMN_FROM, "From", 130, True)
Column.PlusMinus = True
Column.NextVisualBlock = 3
See Also
- GridColumn Object
- PlusMinus Property
- Expanded Property
- OldVisibleIndex Property
- VisibleIndex Property
- ColumnPlusMinusSign Property
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.