473,394 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Datagrid formating

What is best way of having a consistent datagrid format on multiple pages? Any ideas welcome
Tayo
Nov 18 '05 #1
1 1364
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Will | last post by:
In a Windows form: I need the code to manually set the header name of a column in a datagrid to anything i want. Everytime i retieve records from a database, the coloum header of the datagrid...
0
by: Diogo Alves - Software Developer | last post by:
Hi there, I have a big problem here, I am binding a database table to a dataset and then populate a datagrid the problem is that I have a column that is named TOTALMINUTES and type real.... On...
3
by: Tina | last post by:
I have a datagrid where I specified {0:###,###,###} at design time. However sometimes I am putting percentages in the grid instead of money and I want to change the formating to {##%}. I've...
1
by: Thomas Beyerlein | last post by:
Hello, I am loading a dataGrid and formatting it with datagridtablestyle, but when it loads different info it does not clear the old. With out the formatting the code works. I have tried clearing...
4
by: BrianDH | last post by:
Hi I have a datagrid that I populate with a web service dataset. All fields are sent to text. However, one field will not show its value. You can click on a row and see that info in the grid's...
1
by: Tor Inge Schulstad | last post by:
Hi. I need to change the fontsize and vertical alignment of the text in a datagrid. It's a Windows forms application, and I'm using tablestyles to format my datagrid. I do not need to format...
3
by: Horselover Fat | last post by:
Hi, I have a column in a database that holds elapsed time in milliseconds and I want to display that column in a DataGrid in a specific format (d.hh:mm:ss.fff). However, the closest I can get...
0
by: musawer | last post by:
Can Someone give a good link for C# Winform DataGrid Text Style Formating (Font,Color,Size etc)... Quick reply will be highly appreciated... Thanks...
1
by: CreativeMind | last post by:
i have a datagrid having a templatecolumn with headertext="CompletionDate".I want to bind it with either column 'CompletionDate'(datetime) or 'IsReady'(bit). If 'Isready' value is false, then Row...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.