ComboBox inside ListView Style Problem

3 posts, 0 answers
  1. Tamir
    Tamir avatar
    4 posts
    Member since:
    May 2007

    Posted 03 Jun 2012 Link to this post


    I have the a ComboBox with static items inside a ListView:

     <asp:ListView runat="server" ID="lvRoomUsers" 
            ItemPlaceholderID="itemPlaceHolder1" OnItemCommand="lvRoomUsers_ItemCommand"
            onitemdatabound="lvRoomUsers_ItemDataBound" >

                        <table id="tblRoomUsers" class="Grid" cellspacing="0">
                        <tr><th colspan="3">Users in This Room</th></tr>
                           <asp:PlaceHolder ID="itemPlaceHolder1" runat="server" />
                      <asp:HiddenField ID="hfUser" runat="server" Value='<%# Eval("Id") == null ? String.Empty : Eval("Id").ToString() %>' />
                      <asp:HiddenField ID="hfReadOnly" runat="server" Value='<%# Eval("ReadOnly") == null ? String.Empty : Eval("ReadOnly").ToString() %>' />
                      <%# Eval("FirstName") == null ? String.Empty : Eval("FirstName").ToString() + " " + Eval("Surname").ToString()%></td>
                      <asp:UpdatePanel ID="upPermissions" runat="server" >  
                      <Triggers> <asp:AsyncPostBackTrigger ControlID="cbPermissions" EventName="SelectedIndexChanged" /> </Triggers>

                      <telerik:RadComboBox ID="cbPermissions" runat="server" AutoPostBack="true"
                         onselectedindexchanged="cbPermissions_SelectedIndexChanged" Visible='<%# Eval("FirstName") == null ? false : true %>' Width="100"  >
                          <telerik:RadComboBoxItem Text="Read Only" Value="true" />
                              <telerik:RadComboBoxItem Text="Full Access" Value="false" />

                      <td style="text-align:center">
                      <asp:LinkButton ID="btnRemoveUser" runat="server" Text="Remove" CommandName="RemoveUser" Visible='<%# Eval("FirstName") == null ? false : true %>' />
                      <%--<asp:CheckBox ID="chkSelect" runat="server" Visible='<%# Eval("UserName") == null ? false : true %>' />--%>

    The ComboBox is not rendering properly (see attached image) 
  2. Ivana
    Ivana avatar
    657 posts

    Posted 06 Jun 2012 Link to this post

    Hi Tamir,

    I have tried to replicate the described behavior locally, but to no avail. Here is what I have tested:
    <telerik:RadListView ID="RadListView1" DataSourceID="SqlDataSource1" runat="server"
                ItemPlaceholderID="EmployeesContainer" OnItemCommand="RadListView1_ItemCommand"
                DataKeyNames="id" OnItemCreated="RadListView1_ItemCreated" OnItemDataBound="RadListView1_ItemDataBound">
            <fieldset style="float: left; width: 280px; height: 155px">
                <asp:UpdatePanel ID="upPermissions" runat="server">
                        <telerik:RadComboBox ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
                            AutoPostBack="true" EmptyMessage="empty message">
                                <telerik:RadComboBoxItem Text="item1" />
                                <telerik:RadComboBoxItem Text="item2" />
                                <telerik:RadComboBoxItem Text="item3" />
                        <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
                <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" />
                <asp:Button ID="btnDelete" runat="server" Text="Delete" CommandName="Delete" Width="50px" />

    Could you specify the version of RadControls for ASP.NET AJAX that you use in your application?
    Also, does this happen in more than one browser?

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Tamir
    Tamir avatar
    4 posts
    Member since:
    May 2007

    Posted 11 Jun 2012 Link to this post

    Please ignore my post. I realized that the combobox wasn't displaying properly due to css conflicts.
Back to Top