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

2 posts, 0 answers
  1. jackson
    jackson avatar
    4 posts
    Member since:
    Nov 2015

    Posted 12 Jan 2016 Link to this post

    <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;

  2. Nigel
    Nigel avatar
    7 posts
    Member since:
    Oct 2012

    Posted 15 Jan in reply to jackson Link to this post

    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.

Back to Top