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

CheckBoxes with Images or ItemTemplates

3 Answers 218 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Temp
Top achievements
Rank 1
Temp asked on 05 Sep 2011, 04:52 AM
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)?

3 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 07 Sep 2011, 03:56 PM
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 >>

0
Martin Roussel
Top achievements
Rank 1
answered on 23 Jan 2013, 07:25 PM
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
0
Cat Cheshire
Top achievements
Rank 1
answered on 29 Jan 2013, 12:09 PM
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".
Tags
ComboBox
Asked by
Temp
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Martin Roussel
Top achievements
Rank 1
Cat Cheshire
Top achievements
Rank 1
Share this question
or