Spacing columns in DataGrid

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
 
G

Greg Linwood

Thanks Natty - I'll check this option out today.

Regards,
Greg Linwood
SQL Server MVP
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top