Fog Creek Software
g
Discussion Board




ASP.NET Datagrids and border-style:collapse

Much to my surprise, ASP.NET writes code I don't ask it to write. 

I want a datagrid with no formatting.  Just table tags, td's and a couple class attributes.  This does not seem to be possible, after much research.

I must admit this kind of thing was my great fear with ASP.NET - that it would spit out bad markup - like FP, Word, and InterDev did before it. 

Anyone gotten around this?

Matthew Lee
Monday, October 13, 2003

Maybe use the Repeater class instead of shoe-horning the Datagrid?

Ankur
Monday, October 13, 2003

Repeater? But what about sorting, and editing? It's a datagrid I want- I just want to use *my* CSS.  How is this 'shoehorning'?

Matthew Lee
Monday, October 13, 2003

See here for an explanation and workaround:
http://groups.google.com/groups?selm=0112rgrPDHA.2284%40cpmsftngxa06.phx.gbl&rnum=2

SomeBody
Monday, October 13, 2003

The ASP.NET datagrid isn't a generic, "be-all" data grid that MS benevolently (and freely, I might add) put into the framework.  It has limited functionality and is meant to be a simple grid, though you can find workarounds all over the net for people trying to get the datagrid to do things it's not necessarily meant to do.  If you want to do stuff it's not meant to do, then that's shoehorning, I would say.

Ankur
Monday, October 13, 2003

Ahh, I see.  So the Datagrid isn't really a Datagrid, it's a SimpleGrid.  Makes perfet sense!

Matthew Lee
Monday, October 13, 2003

*  Recent Topics

*  Fog Creek Home