ComponentOne List 8.0 for ActiveX
DefaultItem Property

 

True DBList Reference> TDBList Properties> DefaultItem Property

DefaultItem Property

This property returns or sets the zero-based index of the default item for a ValueItems collection associated with a column.

Syntax

valueitems.DefaultItem= integer

Remarks

Read/Write at run time and design time.

Property applies to ValueItems collection.

The default value for this property is -1, which is used to indicate that there is no default item.

Use the DefaultItem property to provide an alternate display for data values not present in the ValueItems collection.

When the DefaultItem property is set to a valid collection index (an integer between 0 and Count - 1, inclusive), then the corresponding ValueItem is displayed when the control encounters a value which is not present in the ValueItems collection.

When the DefaultItem property is set to -1, then the control will not substitute a ValueItem when it encounters a value which is not present in the ValueItems collection.

A trappable error will occur if you attempt to set this property to an invalid value.

Use the ValueItems property to access the ValueItems collection for a Column object.

Note: At design time, the DefaultItem property is specified in the Values property page by clicking the record selector of the desired List row. If no row is selected, then the DefaultItem property will be set to its default value of -1. To deselect a selected row, click its record selector again.

See Also

ValueItem Object, ValueItems Collection

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback