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

    Hi,

    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" >

                    <LayoutTemplate>
                        <table id="tblRoomUsers" class="Grid" cellspacing="0">
                        <tr><th colspan="3">Users in This Room</th></tr>
                           <asp:PlaceHolder ID="itemPlaceHolder1" runat="server" />
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                      <tr>
                      <td>
                      <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>
                      <td>
                      <asp:UpdatePanel ID="upPermissions" runat="server" >  
                      <Triggers> <asp:AsyncPostBackTrigger ControlID="cbPermissions" EventName="SelectedIndexChanged" /> </Triggers>
                   
                      <ContentTemplate>
                     

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

                      </ContentTemplate>
                       </asp:UpdatePanel>
                      </td>
                      <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 %>' />--%>
                      </td>
                     </tr>
                    </ItemTemplate> 
        </asp:ListView>


    The ComboBox is not rendering properly (see attached image) 
  2. Ivana
    Admin
    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">
        <ItemTemplate>
            <fieldset style="float: left; width: 280px; height: 155px">
                <legend>Company:
                    <%#Eval("CompanyName")%>
                </legend>
                <asp:UpdatePanel ID="upPermissions" runat="server">
                    <ContentTemplate>
                        <telerik:RadComboBox ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
                            AutoPostBack="true" EmptyMessage="empty message">
                            <Items>
                                <telerik:RadComboBoxItem Text="item1" />
                                <telerik:RadComboBoxItem Text="item2" />
                                <telerik:RadComboBoxItem Text="item3" />
                            </Items>
                        </telerik:RadComboBox>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" />
                <asp:Button ID="btnDelete" runat="server" Text="Delete" CommandName="Delete" Width="50px" />
            </fieldset>
        </ItemTemplate>
    /telerik:RadListView>

    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?

    Regards,
    Ivana
    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