CheckBoxes with Images or ItemTemplates

4 posts, 0 answers
  1. Temp
    Temp avatar
    55 posts
    Member since:
    May 2007

    Posted 04 Sep 2011 Link to this post

    Hey great advance with the new Checkboxes functionality in the RadComboBox.

    I am trying to use a combo box with the new checkboxes="true" functionality and an itemtemplate because I need to have an icon with some text, but the checkboxes don't show up.
    I really don't want to use the old way with the checkbox in the template, it is much nicer to use the new CheckedItems and other functionality.

    Is it possible to do this (have Checkboxes="true" with a template of some sort)?
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 07 Sep 2011 Link to this post

    Hello Temp,

    Currently CheckBoxes feature does not support templates but we have already started researching the options for implementing this in future versions.

    All the best,
    Kalina
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Martin Roussel
    Martin Roussel avatar
    246 posts
    Member since:
    Jan 2010

    Posted 23 Jan 2013 Link to this post

    Hi, im bringing back this old topic to not create an additional one on the same subject.

    Im having issues setting my RadComboBox to use checkboxes (multiple selection) and having an image per item. I tried two ways where each has its issues.

    1-This way, I lose the "Check all" option, the inputbox doesnt update when checkmarking items and also clicking the images close the dropdown (but check its item).
    <telerik:RadComboBox ID="RadComboBox3" runat="server" CheckBoxes="false" EnableCheckAllItemsCheckBox="true"
                                Width="250" Skin="WebBlue"
                                AllowCustomText="true" Filter="Contains" OnClientDropDownOpened="HighlightText" DataValueField="strCode" DataTextField="strName" >
                                <ItemTemplate>
                                    <div class="combo-item-template">
                                        <label>
                                            <asp:CheckBox runat="server" ID="chk1" Checked="false" />
                                            <img src="/Images/Icons/cart.png" alt="icon" /><%# Eval("strName")%>
                                        </label>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadComboBox>


    2-This way, there's a carriage return after each checkbox. Also, clicking the image or the text doesnt check the checkbox. Probably some CSS can fix this.
    <telerik:RadComboBox ID="RadComboBox3" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
                                Width="250" Skin="WebBlue"
                                AllowCustomText="true" Filter="Contains" OnClientDropDownOpened="HighlightText" DataValueField="strCode" DataTextField="strName" >
                                <ItemTemplate>
                                    <div class="combo-item-template">
                                        <label>
                                            <img src="/Images/Icons/cart.png" alt="icon" /><%# Eval("strName")%>
                                        </label>
                                    </div>
                                </ItemTemplate>
                            </telerik:RadComboBox>

    Please let me know,

    TIA

    Martin
  4. Cat Cheshire
    Cat Cheshire avatar
    128 posts
    Member since:
    Jun 2010

    Posted 29 Jan 2013 Link to this post

    It is possible to use templates and CheckBoxes, but as far as I know -  you cannot use CheckBoxes and Filter because it is not supported.
    There is no need to add checkbox controls in itemtemplate - simply set CheckBoxes="true".
Back to Top