Skip to content

AddComboButton Method

Description

Adds a combo button to the GridRecordItem.

Syntax

Public Function AddComboButton( _
    Optional ByVal bInside As Boolean = False _
) As GridInplaceButton

Parameters

  • bInside: True to draw the button on the inside of the cell. False to draw the button on the outside of the cell.

Return Type

Returns a reference to the GridInplaceButton just added.

Remarks

This adds a drop-down combo button to the GridRecordItem. When the button is pressed, it will display all of the data items that were added as GridRecordItemConstraints.

Example

This sample illustrates how to add a combo button to a GridRecordItem. When clicked, the list of added GridRecordItemConstraints will be displayed.

Dim Column As GridColumn

' Adds a column to the GridControl
Set Column = wndGridControl.Columns.Add(COLUMN_STATUS, "Status", 100, True)

' This will add a combo button to the GridRecordItem
Column.EditOptions.AddComboButton

' This will add the constraints that will be displayed when the combo button is clicked
Column.EditOptions.Constraints.Add "Not Started", taskStatusNotStarted
Column.EditOptions.Constraints.Add "In Progress", taskStatusInProgress
Column.EditOptions.Constraints.Add "Completed", taskStatusCompleted
Column.EditOptions.Constraints.Add "Waiting on someone else", taskStatusWaiting
Column.EditOptions.Constraints.Add "Deferred", taskStatusDeferred

' This will allow the text in the edit box to be changed
Column.EditOptions.ConstraintEdit = True

See Also


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