Options Property

When used with the grid control, this property gets or sets the options displayed in the grid's context menu.

object.Options = [string]

Where object is an object expression that evaluates to one of the controls in the Applies To list, and stringis a list of the datagrid's available entry options.

Use

Grid Control

Datagrid entry options are made up of two parts, a value and a description, which are separated by an equals (=) character. When setting the property each option must be separated by a semi-colon.

For example, setting the Options property to 1=Add;2=Delete;3=Modify will result in the following option drop down:

When an option is selected from the menu, the corresponding value is placed in the first entry-capable cell in the current line. If Grid option auto-enter is turned on in Settings (Settings | Preferences | Smart controls), then the screen is sent immediately to the host when the option is selected.

This property may also be entered as an expression in Designer, by preceding the expression with an equals (=) sign. The expression will be evaluated when the form is initialized, and the property will be set to the result of the evaluation. If the expression is preceded with a plus (+) sign, the options from the expression will be appended to those that are automatically generated by the dynamic recognition engine.

For example, if the drop down pictured above were the automatically generated options for the grid then setting the Options property to +=14=Help would change it to the following list:

See Also

Preference settings | DefaultOption property | Auto-hide option column setting | OptionColumn property

Applies To

DataGrid control


© 2004-2021 looksoftware. All rights reserved.