Skip to content

PlusMinus Property

Description

Specifies whether the column will have an arrow button in the column header that allows the column to be expanded.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property PlusMinus() As Boolean

Remarks

PlusMinus 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 enough to fully display data, but at the same time allow that data to be fully visible with the click of a button.

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


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.