GridView Formatting ?

Discussion in 'ASP .Net' started by luqman, Dec 5, 2007.

  1. luqman

    luqman Guest

    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
     
    luqman, Dec 5, 2007
    #1
    1. Advertising

  2. luqman

    Jayakrishnan Guest

    luqman wrote:
    > 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
    >
    >

    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
     
    Jayakrishnan, Dec 5, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sck10

    GridView Formatting

    sck10, Oct 7, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    16,394
    Steven Cheng[MSFT]
    Oct 18, 2004
  2. Not Me
    Replies:
    0
    Views:
    488
    Not Me
    Sep 23, 2005
  3. washoetech

    Gridview Item formatting

    washoetech, Sep 29, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    9,102
    Steven Cheng[MSFT]
    Sep 30, 2005
  4. Replies:
    2
    Views:
    4,601
  5. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    18,009
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
Loading...

Share This Page