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

How to remove the Check all option from RadComboBox

1 Answer 232 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
jackson
Top achievements
Rank 1
jackson asked on 14 Jan 2016, 09:12 AM
When there is no item in RadComboBox i did't want check all option.


<telerik:RadComboBox ID="RadComboBoxSites" runat="server"  OnClientItemChecking="OnClientItemChecking"  CheckBoxes="true"  EnableCheckAllItemsCheckBox="true" DataTextField="SiteName" DataValueField="SiteUid" AppendDataBoundItems="true" OnItemDataBound="RadComboBoxSites_ItemDataBound" DropDownWidth="250px"OnClientDropDownOpening="disableComboBoxSeparator;disableCheckall" EmptyMessage="Please select a site..." MaxHeight="192px">
</telerik:RadComboBox>

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 19 Jan 2016, 03:56 AM
Hi Jackson,

You can use the following approach to achieve this requirement:
protected void RadComboBox1_DataBound(object sender, EventArgs e)
{
    RadComboBox combo = sender as RadComboBox;
    combo.EnableCheckAllItemsCheckBox = combo.Items.Count > 0;
}

Hope this helps.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ComboBox
Asked by
jackson
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or