Checkbox inside the Combobox

3 posts, 0 answers
  1. Karthi Keyan
    Karthi Keyan avatar
    17 posts
    Member since:
    Oct 2009

    Posted 21 Nov 2009 Link to this post

    Hi,
        OnClientLoad i am populating the Radcombobox with list of datas. Now  I am having a checkbox item template inside the RadCombobox, OnclientLoad how can i populate the checkbox with corresponding list of values.

    <telerik:RadComboBox ID="RadComboBox1" OnClientLoad="loadComboBox" OnClientDropDownClosed="OnClientDropDownClosedHandler"  runat="server">
        <ItemTemplate>
            <div >
              <asp:CheckBox ID="CheckBox1" runat="server" Checked="true" onclick="onCheckBoxClick(this)"/>
                <asp:Label runat="server" ID="Label1" AssociatedControlID="CheckBox1">
                </asp:Label>
            </div>
      </ItemTemplate>

    My function looks somewhat similar like this for binding only list of datas:
      function OnCompleteOne(result) {

                    var combo = $find("<%= RadComboBox1.ClientID %>");
                    for (var i = 0; i < result.length; i++) {

                        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                        comboItem.set_text(result[i]);
                        combo.trackChanges();
                        combo.get_items().add(comboItem);
                        var items = combo.get_items();
                         comboItem.select();
                        combo.commitChanges();
                    }

                          }


    My requriment is  i want to assign the result values to the checkbox.
    Kindly provide sample code if possible.

    Thanks and regards,
    Karthikeyan.G

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 23 Nov 2009 Link to this post

    Hi Karthi,

    You cannot have a template and load the items on the client., the items should be loaded in the server in order to use the template.

    Kind regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Karthi Keyan
    Karthi Keyan avatar
    17 posts
    Member since:
    Oct 2009

    Posted 25 Nov 2009 Link to this post

    HI Yana,

            I am used RadTree for getting checkbox inside the combobox and we can get the checked nodes.
     

    With regards,
    Karthikeyan.G
Back to Top