Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

Please tell me for displaying data from table is there any option other then gridview which will give more clean look to the application...
Posted

1 solution

Repeater Control can render headers,each row,footer with the exact html you specify for each row. But even a gridview can be styled to look cleaner in most cases, only that you cant prevent a table from being rendered.

XML
<asp:Repeater ID="RepeaterSample" runat="server">
        <HeaderTemplate>
            <div id="header">
                Header</div>
        </HeaderTemplate>
        <ItemTemplate>
            <div id="Oddrow">
                Custom Content</div>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <div id="EvenRow">
                Custom Content</div>
        </AlternatingItemTemplate>
        <FooterTemplate>
            <div id="footer">
                Footer</div>
        </FooterTemplate>
 </asp:Repeater>


Hope it helps.
 
Share this answer
 
v2
Comments
[no name] 10-Oct-12 3:08am    
Thanks..
TheCoolCoder 10-Oct-12 3:58am    
was that what you were looking for ?? did it help??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900