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

ComboBox issue - Checkboxes = "True" and ItemTemplate

1 Answer 237 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Aret
Top achievements
Rank 1
Aret asked on 17 Jun 2014, 08:00 PM
I have a radcombobox which has the checkbox property set to true and I am also using an item template for my radcombobox in order to display a tooltip for each item.  Upon implementing all of this, the functionality actually works, however each checkbox along with its description is outlined by separate rows.  I would like the checkbox associated to each item to be in the same row.  How would I be able to achieve this format.  I have attached an image to this forum post visually showing my issue.  I am also posting code below to show how I am coding my radcombobox.  Please Assist!



Code:

<telerik:RadComboBox EmptyMessage="Show All" ID="ddStatusFilter" checkboxes="True" runat="server" Width="130px" HighlightTemplatedItems="true" style="margin-left:14px;">

<itemtemplate>
<asp:Label runat="server" ID="lblEventName" Text='<%# Eval("Event_Name")%> '></asp:Label>
<telerik:RadToolTip ID="RadToolTip1" runat="server" Width="150" Height="10" TargetControlID="lblEventName" AutoCloseDelay="8000"
Position="BottomRight" Text='<%# Eval("Event_Desc")%>'>
</telerik:RadToolTip>

</itemtemplate>

</telerik:RadComboBox>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jun 2014, 03:29 AM
Hi Aret,

This is the default behavior of the control. As a work around you can add an CheckBox to the ItemTemplate then both Label and CheckBox will show in one line. Please have a look into the following sample code snippet which works fine at my end.

ASPX:
<telerik:RadComboBox EmptyMessage="Show All" ID="ddStatusFilter"  runat="server" Width="130px" HighlightTemplatedItems="true" Style="margin-left: 14px;">
    <ItemTemplate>
        <asp:CheckBox ID="chkboxStatus" runat="server" />
        <asp:Label runat="server" ID="lblEventName" Text='<%# Eval("Event_Name")%> '></asp:Label>
        <telerik:RadToolTip ID="RadToolTip1" runat="server" Width="150" Height="10" TargetControlID="lblEventName" AutoCloseDelay="8000" Position="BottomRight" Text='<%# Eval("Event_Desc")%>'>
        </telerik:RadToolTip>
    </ItemTemplate>
</telerik:RadComboBox>

Thanks,
Shinu.
Tags
ComboBox
Asked by
Aret
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or