Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

GridView Formatting ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
luqman - 05 Dec 2007 10:04 GMT
How can I convert the following code to CSS Style Sheet, so that I can apply
this style to other GridView Controls ?

asp:GridView ID="GridView1" runat="server" CellPadding="4"
ForeColor="#333333" GridLines="None">
           <FooterStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
           <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
           <EditRowStyle BackColor="#999999" />
           <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True"
ForeColor="#333333" />
           <PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
           <HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
           <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
       </asp:GridView>

Best Regards,

Luqman
Jayakrishnan - 05 Dec 2007 10:26 GMT
> How can I convert the following code to CSS Style Sheet, so that I can apply
> this style to other GridView Controls ?
[quoted text clipped - 17 lines]
>
> Luqman

There is an option to create a skin file for all control. Just paste the
 above code in skin file and use <%@ Page Theme="theme1" in aspx file

Jay
Manuel Ricca - 05 Dec 2007 11:34 GMT
You can use a css for the entire gridview and also for each individual
style (HeaderStyle, EditRowStyle, ...). Just reference your css from
the aspx page and set the CssClass properties you want.
You can check out my article for this:
http://www.codeproject.com/KB/aspnet/SkinSample.aspx

Manuel Ricca

On Dec 5, 10:26 am, Jayakrishnan <jayakrish...@iinterchange.com>
wrote:
> luqman wrote:
> > How can I convert the following code to CSS Style Sheet, so that I can apply
[quoted text clipped - 25 lines]
>
> - Show quoted text -

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.