Spacing columns in DataGrid

  • Thread starter Thread starter Greg Linwood
  • Start date Start date
G

Greg Linwood

I'm using a Data Grid and want to apply wider spacing between columns than
rows. As such, cellspacing / padding aren't any use to me.

I used to do this in html tables by simply adding columns with a single
point transparent .gif, set to a specific .pt width. This worked very well
for precise alignment.

I can't find an easy way to do this using a DataGrid. It is possible for me
to add columns (I'm doing this at run-time) but the darned thing requires me
to give a UNIQUE NAME to these columns which is really peeving me because
the columns have no other purpose but spacing. There's nothing unique to
name about them. What's worse, it displays the Column name in the header
row, which limits me to naming the columns with progressively longer strings
of blank strings, just to get a unique column name that won't display
anything when the table is rendered.. :c/

Surely there's a better way to do this!!

I'd appreciate any suggestions.

Regards,
Greg Linwood
SQL Server MVP
 
Thanks Natty - I'll check this option out today.

Regards,
Greg Linwood
SQL Server MVP
 
Back
Top