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

I have a Rad Combo Box in which i have two separator's .How can I remove checkbox only from separator's?

1 Answer 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jackson
Top achievements
Rank 1
jackson asked on 12 Jan 2016, 04:17 PM

<telerik:RadComboBox ID="RadComboBoxSites" runat="server"CheckBoxes="true" EnableCheckAllItemsCheckBox="true"DataTextField="SiteName" DataValueField="SiteUid" AppendDataBoundItems="true" OnItemDataBound= "RadComboBoxSites_ItemDataBound"EmptyMessage="Please Select ." MaxHeight="192px"></telerik:RadComboBox>

 

 

C# code for separator's 

RadComboBoxItem warehouseHeader = new RadComboBoxItem("--- Warehouses ---", "");
            warehouseHeader.IsSeparator = true;
            
            RadComboBoxSites.Items.Add(warehouseHeader);
            isWarehouseHeaderAdded = true;

1 Answer, 1 is accepted

Sort by
0
Nigel
Top achievements
Rank 1
answered on 16 Jan 2017, 03:23 AM

Was just trying to answer the same issue - this is what I have come up with

Add a style:

.hidden  {     display:none !important; }

On your drop down add a OnClientLoad and then use a function similar to below

function myDropDown_OnClientLoad(sender, args) {

    var dropDown = sender.get_element();

    $telerik.$(dropDown).find(".rcbSeparator").find(".rcbCheckBox").addClass("hidden");

}

Hope it helps - its working for me, but may not answer your particular scenario.

Tags
General Discussions
Asked by
jackson
Top achievements
Rank 1
Answers by
Nigel
Top achievements
Rank 1
Share this question
or