datagrid => generate "clean" tables
Posted on 2004-11-12
I want to generate a table like this:
Currently, I'm doing this with an asp:repeater control, which I think is kinda stupid, because there is the excellent datagrid control.
However, there are 2 problems:
1) I'm a css designer and I want to fully seperate content and design.
What I want is '<table class="blabla">'
but what I get is <table cellspacing='0' rules='all' border='1' id='DataGrid1'
Asp.Net is generating cellspacing, rules, border and style attributes which a) conflict with the way I want my design 2) are unnessecary because I just want a simple plain table.
So, is there a way to get rid of all of those?
2) I would like my first row to have "th" tags instead of "td"'s. But this is a smaller problem and is not as important as the first. But is it possible anyway?
Thanks to anyone who can help me out.
Besides, I don't like the way Asp.Net has implemented the style attribute. The "headerstyle-font-bold" etc look just messy. And why would anyone want to generate inline CSS? Come on people, we've waited ages to have a seperation of content and design, and .Net helped in that with server controls, but why still mix up content and presentation this way? Comments on this highly appreciated, too. :o)