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

ListView Default Border

3 Answers 177 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 2
Allan asked on 31 Oct 2012, 10:33 PM
By default there is a black bounding border one pixel wide around the ListView. Setting BorderColor, Style, and/or Width has no effect. Is there a way to remove the border?

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 01 Nov 2012, 09:51 AM
Hi Allan,

I suppose you want to remove the default border, which browsers apply to <fieldset> elements. Try styling the fieldset as follows to remove the default border.

ASPX:
<telerik:RadListView ID="RadListView1" runat="server" ItemPlaceholderID="PlaceHolder1" ....>
    <LayoutTemplate>
        <fieldset style="border: none;" >
            <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
        </fieldset>
    </LayoutTemplate>
    <ItemTemplate>
        ..........
    </ItemTemplate>
</telerik:RadListView>

Hope this helps.

Regards,
Princy.
0
Jacob
Top achievements
Rank 1
answered on 22 Jan 2013, 08:30 PM
Hi,

I have tryed you solution but i cant get it to work. It still show the border around the listview?

Hope you are able to help

Regards,
Jacob

<telerik:RadListView runat="server" ID="ActivityListView" AllowPaging="False" DataKeyNames="Id" BorderWidth="0px" BorderStyle="None">
                                        <ItemTemplate>
                                            <fieldset style="border: none;">
                                                <div class="infotext" style="border: none;">
                                                     <asp:Label ID="DateLabel" CssClass="act_date" runat="server" Text='<%# Eval("ActivityDate", "{0:dd MMMM yyyy}") %>'></asp:Label>
                                                    <br/>
                                                     <asp:Label ID="HeaderTextLabel" CssClass="act_header" runat="server" Text='<%# Eval("HeaderText") %>'></asp:Label>
                                                    <br />
                                                </div>
                                            </fieldset>
                                        </ItemTemplate>
                                        <EmptyDataTemplate>
                                                <div class="RadListView RadListView_<%# Container.Skin %>">
                                                    <div class="infotext">
                                                        Ingen aktiviteter.</div>
                                                </div>
                                        </EmptyDataTemplate>
                                        <LayoutTemplate>
                                                <div class="RadListView RadListView_<%# Container.Skin %>">
                                                    <div id="itemPlaceholder" runat="server">
                                                    </div>
                                                </div>
                                        </LayoutTemplate>
                                    </telerik:RadListView>
0
Eyup
Telerik team
answered on 25 Jan 2013, 02:10 PM
Hello Jacob,

Please try to apply the styling to the LayoutTemplate instead and let us know about the result.

Kind regards,
Eyup
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.
Tags
ListView
Asked by
Allan
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Jacob
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or