473,397 Members | 1,969 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,397 software developers and data experts.

Styles For DataGrid

I need to know how ( If possible ) to set up a CSS for a datagrid so they
all have the same attributes without me farting around setting it manually
each time I add a grid.

Is this possible ?

--
Best Regards

The Inimitable Mr Newbie º¿º
Nov 30 '05 #1
4 2120
Hi,

Mr Newbie wrote:
I need to know how ( If possible ) to set up a CSS for a datagrid so
they all have the same attributes without me farting around setting
it manually each time I add a grid. Is this possible ?


Absolutely -- just use the CssClass attribute to assign a CSS class for
<asp:datagrid> (and optionally <ItemStyle>, <AlternatingItemStyle> etc.)
tags. Define the class in your stylesheet as desired.

--
Chris Priede
Nov 30 '05 #2
can I have an example please because I dont see ItemStyle in the
intellisense come up int he style sheet when I try to defiine and item for
the styl.

--
Best Regards

The Inimitable Mr Newbie º¿º
"Chris Priede" <pr****@panix.com> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi,

Mr Newbie wrote:
I need to know how ( If possible ) to set up a CSS for a datagrid so
they all have the same attributes without me farting around setting
it manually each time I add a grid. Is this possible ?


Absolutely -- just use the CssClass attribute to assign a CSS class for
<asp:datagrid> (and optionally <ItemStyle>, <AlternatingItemStyle> etc.)
tags. Define the class in your stylesheet as desired.

--
Chris Priede

Nov 30 '05 #3
http://www.societopia.net/samples/Da..._cssClass.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Mr Newbie" wrote:
can I have an example please because I dont see ItemStyle in the
intellisense come up int he style sheet when I try to defiine and item for
the styl.

--
Best Regards

The Inimitable Mr Newbie º¿º
"Chris Priede" <pr****@panix.com> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi,

Mr Newbie wrote:
I need to know how ( If possible ) to set up a CSS for a datagrid so
they all have the same attributes without me farting around setting
it manually each time I add a grid. Is this possible ?


Absolutely -- just use the CssClass attribute to assign a CSS class for
<asp:datagrid> (and optionally <ItemStyle>, <AlternatingItemStyle> etc.)
tags. Define the class in your stylesheet as desired.

--
Chris Priede


Nov 30 '05 #4
Thanx for the sample. I have got it to work, but unless you know the style
items which can be applied, and know where they go this can be a bit of a
minefield.

Do you know of a resource which shows this ?

--
Best Regards

The Inimitable Mr Newbie º¿º
"Phillip Williams" <Ph**************@webswapp.com> wrote in message
news:EB**********************************@microsof t.com...
http://www.societopia.net/samples/Da..._cssClass.aspx
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Mr Newbie" wrote:
can I have an example please because I dont see ItemStyle in the
intellisense come up int he style sheet when I try to defiine and item
for
the styl.

--
Best Regards

The Inimitable Mr Newbie º¿º
"Chris Priede" <pr****@panix.com> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> Mr Newbie wrote:
>> I need to know how ( If possible ) to set up a CSS for a datagrid so
>> they all have the same attributes without me farting around setting
>> it manually each time I add a grid. Is this possible ?
>
> Absolutely -- just use the CssClass attribute to assign a CSS class for
> <asp:datagrid> (and optionally <ItemStyle>, <AlternatingItemStyle>
> etc.)
> tags. Define the class in your stylesheet as desired.
>
> --
> Chris Priede
>


Nov 30 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Darryn Ross | last post by:
Hi, I am having a few problems with my datagrid, the data in my database isn't coming through right. for example 100.00 in the table is coming through as 100 and 01/01/2004 in the table is...
1
by: MrNobody | last post by:
What I was hoping to do was have a universal Windows Form which features a DataGrid. This Formcould be accessed from several different points of entry, each one may require a different style...
2
by: RB | last post by:
Hi All, The ASP.NET Datagrid's pagination capability allows me to display either the Next/Prev buttons or the Page numbers to allow the user to navigate through the datagrid page by page as...
3
by: Aaron Smith | last post by:
I can't seem to get my table styles to apply to my DataGrid. In order for them to apply correctly, what exactly has to be set in the DataSource and DataMember, and then the DataMapping properties?...
3
by: Richard | last post by:
Rather than all that painting, brush, etc. code to change the styles of a ..NET datagrid to start with and on the fly, I'd rather be able to set a lot of the stuff in the designer properties of the...
4
by: Peter | last post by:
I am using ArrayDataView from the following link, my question is how do I apply column styles to this DataGrid that uses ArrayDataView instead of DataSet ...
3
by: Peter | last post by:
I am using ArrayDataView from the following link, my question is how do I apply column styles to this DataGrid that uses ArrayDataView instead of DataSet ...
3
by: Sebastian Paul | last post by:
Hi, I registered a WebControlAdapter for any WebControl, that removes all ID attributes (I actually do not need them). Everything works as expected, but the DataList ignores any styles (ItemStyle,...
0
by: chithrausha | last post by:
hi can anyone help me in setting the styles for a grid control. i want a design like this. iam having a grid control in which i want to display different styles for header text and different...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.