Skip to content

Count Property

Description

Returns the total number of constraints added to the GridRecordItem and/or GridColumn.

Property Type

Read-only property

Syntax (Visual Basic)

Public Property Count() As Long

Example

Constraint Count Sample (Visual Basic)

This sample illustrates how to determine the number of constraints added to a column or item.

Dim COLUMN_IMPORTANCE = 1

Dim Column As GridColumn

' Adds a column to the GridControl
Set Column = wndGridControl.Columns.Add(COLUMN_IMPORTANCE, "Importants", 18, False)

' Adds some constraints that will be displayed when the combo button is clicked
' All items in this column will have the same constraints
Column.EditOptions.Constraints.Add "Low", taskImportanceLow
Column.EditOptions.Constraints.Add "Normal", taskImportanceNormal
Column.EditOptions.Constraints.Add "High", taskImportanceHigh

Column.EditOptions.AllowEdit = False
Column.EditOptions.ConstraintEdit = True

' Adds a combo button
Column.EditOptions.AddComboButton

' Displays the number of constraints added to the GridColumns collection of constraints
Debug.Print Column.EditOptions.Constraints.Count

See Also


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