empty list item

2 posts, 0 answers
  1. oVan
    oVan avatar
    35 posts
    Member since:
    Apr 2008

    Posted 21 Oct 2008 Link to this post

    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:

    1 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.
  2. Rosi
    Rosi avatar
    2527 posts

    Posted 21 Oct 2008 Link to this post

    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,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
Back to Top