CSS and datagrid?

G

Guest

Hi folks,
I'm using VS 2003 with Framework 1.1
I'm writing an intranet application that makes use of Datagrids

I will be creating the columns declaratively (and not using autogenerate)

I wish to tie various CSS styles with various columns particularly for
the purposes of width/height/padding and borders

I know that CSS doesn't deal with the level of abstraction of a datagrid
bound column and works mainly with XHTML (or XML) elements, which is what the
bound column becomes when sent via HTTP to the browser.

so am I right in thinking that I set the CSS rule to be for the <TD> element
but with a different class and/or ID class for each differently formatted
column?
if so, how do I say that this column is this CSS class...do I just give each
column and ID or class and that's that?

or is all that wrong and you know of a better way of solving this problem
Any help would be greatly appreciated!
Regards and Thanks in advance,
CharlesA
 
G

Guest

Thanks for that Patrick
I can't however access that link you showed ! something is broken there.
Regards,
CharlesA
 
G

Guest

Hi Charles,

The datagrid has a syntax for specifying the styles for each area, e.g.
header, footer, item, like this:
<HeaderStyle CssClass ="DataGrid1HeaderStyle"></HeaderStyle>
<EditItemStyle CssClass="DataGrid1EditItemStyle"></EditItemStyle>
<AlternatingItemStyle CssClass ="DataGrid1Alternate"></AlternatingItemStyle>

Then each column within the ItemTemplate allows you syntax to specifying a
cssClass for each column if you wish. The link that Patrick posted for the
demo is: http://www.societopia.net/samples/DataGrid_cssClass.aspx
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top