Click here to Skip to main content
15,905,912 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to Styling a GridView's rows and cells with CSS IN ASP.NET
Posted

thanks all to answer my question..
 
Share this answer
 
Hi,
You can use CSS3 properties as they apply to usual HTML table: refer to my Tips posted on Codeplex (links follow):

  1. Alternate Rows in ASP.NET GridView, HTML5 Tables[^]
  2. Fixed Table Header atop scrollable GridView in ASP.NET[^]
  3. HTML5 Tables formatting: alternate rows, color gradients, shadows[^]
  4. Nested GridView controls in ASP.NET: best practices[^]
  5. Click/select Row in ASP.NET GridView or HTML Table[^]

Also, I will recommend to look at Solution 1 posted above in regards to formatting particular table elements like selected rows.

Kind regards,
AB
 
Share this answer
 
I think you'd better use the ListView control. because it will not render anything by default and you can form it as you want.
 
Share this answer
 
 
Share this answer
 
XML
<asp:gridview ID="Gridview1" runat="server">
    <AlternatingRowStyle CssClass="" />
    <EditRowStyle  CssClass=""/>
    <FooterStyle CssClass=""/>
    <HeaderStyle CssClass=""/>
    <PagerStyle CssClass=""/>
    <RowStyle CssClass=""/>
    <SelectedRowStyle CssClass=""/>
    </asp:gridview>



Create css for each of the above sections and apply
 
Share this answer
 
Comments
ridoy 13-Oct-12 14:15pm    
good..+5

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