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

RadListView Layout Template bug with <ul> <li>

1 Answer 125 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Camilo
Top achievements
Rank 1
Camilo asked on 02 Mar 2011, 05:43 AM
Im binding this

<telerik:RadListView runat="server" ID="rlvMyTaxReportsCustomization"
        onitemdrop="rlvMyTaxReportsCustomization_ItemDrop">
    <ClientSettings AllowItemsDragDrop="true">
        <ClientEvents OnItemDropping="reportDropping" />
    </ClientSettings>
    <LayoutTemplate>
        <ul id="ulMyTaxReportsCustomization" runat="server" class="noBullet">
            <li id="itemPlaceHolder" runat="server"></li>
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li id="liMyTaxReportsCustomization" runat="server">
            <asp:CheckBox ID="MyTaxReportsCustomizationHidden" runat="server" text="Hide" Checked='<%#Eval("hidden").ToString().Equals("1") %>' CssClass="cbHide" />
            <div id="divMyTaxReportsCustomization" class="rlvI" runat="server">
                <div class="rlvDrag" onmousedown="Telerik.Web.UI.RadListView.HandleDrag(event, '<%# Container.OwnerListView.ClientID %>', <%# Container.DisplayIndex%>)">                                              
                    <asp:LinkButton ID="lkbMyTaxReportsCustomization" runat="server" CssClass="aCont">
                        <%#Eval("name") %>
                        <asp:Label ID="lblMyTaxReportsCustomizationFrom" runat="server" Text='<%#Eval("from"," (from {0} )") %>' ></asp:Label>
                    </asp:LinkButton>
                </div>
            </div>
        </li>
    </ItemTemplate>
</telerik:RadListView>

with this CSS

.rlvI
{
    display:block;
}
 
.rlvDrag
{
    display:block;
}
 
.cbHide
{
    float:right;
}
 
.aCont
{
    display:block;
    text-decoration:none;
}
 
.noBullet
{
    list-style-type: none;
    padding: 0;
    margin-left: 0;
}


and Im getting the result in the attached image.

The obvious thing I am looking for is a hide checkbox align to the right and I tried this in a static <ul><li> schema and also in a normal ASP.NET ListView and they displayed as I was lloking for... I know this could be an issue, but could you lend me a hand to make it look as I want to?? it is really important, or maybe if there is a fix for this...

Thanks in advance,

Camilo

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 07 Mar 2011, 01:40 PM
Hello Camilo,

In order to implement the desired look, I recommend that you use the following style for the list items:
CSS
Copy Code
li.list_item {
    clear: right;
}
ASPX
Copy Code
<telerik:RadListView runat="server" ID="rlvMyTaxReportsCustomization"
        onitemdrop="rlvMyTaxReportsCustomization_ItemDrop">
    <ClientSettings AllowItemsDragDrop="true">
        <ClientEvents OnItemDropping="reportDropping" />
    </ClientSettings>
    <LayoutTemplate>
        <ul id="ulMyTaxReportsCustomization" runat="server" class="noBullet">
            <li id="itemPlaceHolder" runat="server"></li>
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li id="liMyTaxReportsCustomization" runat="server" class="list_item">
            <asp:CheckBox ID="MyTaxReportsCustomizationHidden" runat="server" text="Hide" Checked='<%#Eval("hidden").ToString().Equals("1") %>' CssClass="cbHide" />
            <div id="divMyTaxReportsCustomization" class="rlvI" runat="server">
                <div class="rlvDrag" onmousedown="Telerik.Web.UI.RadListView.HandleDrag(event, '<%# Container.OwnerListView.ClientID %>', <%# Container.DisplayIndex%>)">                                            
                    <asp:LinkButton ID="lkbMyTaxReportsCustomization" runat="server" CssClass="aCont">
                        <%#Eval("name") %>
                        <asp:Label ID="lblMyTaxReportsCustomizationFrom" runat="server" Text='<%#Eval("from"," (from {0} )") %>' ></asp:Label>
                    </asp:LinkButton>
                </div>
            </div>
        </li>
    </ItemTemplate>
</telerik:RadListView>

I hope this helps.

Kind regards,
Mira
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
ListView
Asked by
Camilo
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or