Datagrid formating

Discussion in 'ASP .Net' started by =?Utf-8?B?VGF5bw==?=, May 24, 2004.

  1. What is best way of having a consistent datagrid format on multiple pages? Any ideas welcome
    Tayo
    =?Utf-8?B?VGF5bw==?=, May 24, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?VGF5bw==?=

    Raterus Guest

    I use css classes

    <asp:datagrid id="dgScans" runat="server" pagesize="5" allowpaging="True" width="100%" datakeyfield="ScanPath" cellpadding="3" cssclass="datagrid" autogeneratecolumns="False">
    <selecteditemstyle cssclass="selectedItemStyle"></SELECTEDITEMSTYLE>
    <itemstyle cssclass="itemStyle""></ITEMSTYLE>
    <alternatingitemstyle cssclass="alternatingItemStyle"></alternatingitemstyle>
    <headerstyle cssclass="headerStyle"></HEADERSTYLE>
    <footerstyle cssclass="footerStyle"></FOOTERSTYLE>
    <columns>
    <asp:buttoncolumn commandname="Select" headertext="Filename" datatextfield="Name"></asp:buttoncolumn>
    <asp:boundcolumn headertext="Scan Date" datafield="ScanDate"></asp:boundcolumn>
    </COLUMNS>
    <pagerstyle cssclass="pagerStyle"></PAGERSTYLE>
    </asp:datagrid>
    ..datagrid

    {

    border: 1px #013DA4 solid;

    background-color: #FFFFFF;

    }

    ..selectedItemStyle

    {

    background-color: "#DDEEFF";

    color: Navy;

    font-weight: bold;

    }

    ..itemStyle

    {

    color: #000066;

    }

    ..alternatingItemStyle

    {

    background-color: #F7F7FC;

    }

    ..headerStyle

    {

    color: white;

    font-size: 0.7em;

    font-weight:bold;

    background-image: url(../images/HeaderBackground.gif);

    background-color: #4455aa

    }

    tr.headerStyle td a:link

    {

    color: white;

    text-decoration: none;

    }

    tr.headerStyle td a:visited

    {

    color: white;

    text-decoration: none;

    }

    tr.headerStyle td a:hover

    {

    color: white;

    text-decoration: underline;

    }

    tr.headerStyle td a:active

    {

    color: white;

    text-decoration: underline;

    }

    ..footerStyle

    {

    background-color: White;

    color: #000066;

    }

    ..pagerStyle

    {

    background-color: White;

    color: #000066;

    text-align: left;

    }

    "Tayo" <> wrote in message news:...
    > What is best way of having a consistent datagrid format on multiple pages? Any ideas welcome.
    > Tayo
    Raterus, May 24, 2004
    #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. rodrigo guerra

    automatic code formating...

    rodrigo guerra, Jul 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    343
    rodrigo guerra
    Jul 5, 2003
  2. Tina

    Runtime DataGrid formating

    Tina, Dec 21, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,341
  3. Formating DataGrid/View

    , Feb 22, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    382
  4. Harley

    conditional formating on Datagrid control

    Harley, Jul 29, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    118
    Saravana
    Jul 31, 2003
  5. Annie

    Datagrid formating to be inherited by all others

    Annie, Sep 9, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    106
    Annie
    Sep 9, 2005
Loading...

Share This Page