ComponentOne ToolBar for ASP.NET AJAX: ToolBar Behavior > Button Selection

Button Selection

Use the AllowMultipleSelectInControl property to specify the item selection mode in all of the groups in the control. If the property is set to false, then only a single item can be selected in the control no matter what is the SelectionMode property in the C1ToolBarItem set. For example, if the SelectionMode property is set to SelectionMode.MultiSelect and the AllowMultipleSelectInControl is set to false, then only a single item can be selected.

Note: AllowMultipleSelectInControl property has higher priority than SelectionMode property in C1ToolBarItem.

Use SelectionMode property to specify which mode of selection that the control should take.

The following table lists the value, constant, and description for the SelectionMode settings:

 

Value

Constant

Description

0x1

None

No items can be selected in the group.

0x2

One

Only one item can be selected in the group.

0x4

MultiSelect

One or more items can be selected in the group.

0x8

UnSelect

Can unselect the selected item.

0x16

AlwaysHasSelected

Always has selected item.

 

If you want to select one item and the selected item can be unselected, you can set the property to SelectionMode.One | SelectionMode.UnSelect.

If you want to select multiple items and require at least one item is selected, you can set the property to SelectionMode.MultiSelect | SelectionMode.AlwaysHasSelected.

If you set the property to SelectionMode.None | SelectionMode.One, you will get the same effect as setting it to SelectionMode.None.

If you set the property to SelectionMode.One | SelectionMode.MultiSelect, you will get the same effect as setting it to SelectionMode.One.

Note: The priority of the SelectionMode is as following. None > One > MultiSelect


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.