horizontal rural (line) in datalist

Last Reply on Mar 28, 2014 12:39 AM By Amit

Posted on Mar 26, 2014 01:55 AM

I hv a datalist with repeat coloumn=4 and repeat direction = horizontal.

I want once it display 4 items it should display separater( line or horizontal rural hr tag ).and then again display 4 columns

Posted on Mar 28, 2014 12:39 AM

Below css working for me whick display horizontal as well as vertical line.


<style type="text/css">
    .MyStyle td
    border-bottom: solid 1px silver;
    border-collapse: collapse;
    border-right: solid 1px silver;
    border: solid 1px silver;


And I use this css in my datalist which is having repeat column=4:


<asp:DataList CssClass="MyStyle"  ID="dl_featured" runat="server" CellPadding="1" CellSpacing="1" RepeatColumns="4"
                        RepeatDirection="Horizontal" OnItemDataBound="dl_featured_ItemDataBound" Width="100%"
                        OnItemCommand="dl_featured_ItemCommand" EnableViewState="false">


Above code display the desired output