ComboBox issue - Checkboxes = "True" and ItemTemplate

2 posts, 0 answers
  1. Aret
    Aret avatar
    6 posts
    Member since:
    May 2013

    Posted 17 Jun 2014 Link to this post

    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>
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jun 2014 in reply to Aret Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top