This is a migrated thread and some comments may be shown as answers.

empty list item

1 Answer 53 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
oVan
Top achievements
Rank 2
oVan asked on 21 Oct 2008, 08:33 AM

Would it be possible to implement the EmptyListItem functionality as seen in GridDropDownColumn also in the RadComboBox control?

With the GridDropDownColumn, you can add this:

EnableEmptyListItem="true" EmptyListItemText="(select project)" EmptyListItemValue="" 

With the ComboBox you can set Text="(select item)" but that disappears after you select an item, or you can manually add a first item and then set AppendDataBoundItems="true" but that's not as elegant as above.

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 21 Oct 2008, 09:36 AM
Hi oVan,

This functionality can be achieved by using set the AppendDataBoundItems property to true and  hooking on the DataBound event of RadComboBox and use the code below in its event handler:

RadComboBox1.Items.Insert(0, new RadComboBoxItem("(SelectProject)");

Also you can use the EmptyMessage property of the control to achieve your goal.

That is why we do not have plans to achieve an EmptyListItem property ,but if it becomes a common client request we will implement it.

All the best,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
oVan
Top achievements
Rank 2
Answers by
Rosi
Telerik team
Share this question
or