By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,483 Members | 3,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,483 IT Pros & Developers. It's quick & easy.

Datagrid formating

P: n/a
What is best way of having a consistent datagrid format on multiple pages? Any ideas welcome
Tayo
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <an*******@discussions.microsoft.com> wrote in message news:CD**********************************@microsof t.com...
What is best way of having a consistent datagrid format on multiple pages? Any ideas welcome.
Tayo

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.