473,395 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Spacing columns in DataGrid

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
Nov 18 '05 #1
2 1625
Hi,

What about css that will change border-right-width and border-left-width
style attribute.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
Thanks Natty - I'll check this option out today.

Regards,
Greg Linwood
SQL Server MVP

"Natty Gur" <na***@dao2com.com> wrote in message
news:uf**************@TK2MSFTNGP12.phx.gbl...
Hi,

What about css that will change border-right-width and border-left-width
style attribute.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also...
7
by: Billy Jacobs | last post by:
I am using a datagrid to display some data. I need to create 2 header rows for this grid with columns of varying spans. In html it would be the following. <Table> <tr> <td colspan=8>Official...
2
by: Kevin | last post by:
Hi Al Can someone tell me how to hide colums in a datagrid. I have a one datagrid that is a master and child and I would like to hide specific columns, how do I do this TI Kevin
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
7
by: Ryan | last post by:
I am not a web programmer and trying to figure out the best way for laying out a form for data entry. I would like, for example, to have a right justified label followed by 5 pixals and a left...
2
by: Terry Olsen | last post by:
I'm using a Datagrid to display my data. I want to increase the cell spacing of the grid, but when I do, if a cell is empty, there is no border drawn for that cell. I tried just entering a 'space'...
2
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
10
by: phil-news-nospam | last post by:
I have a table with 3 columns in 1 row. I want to increase the spacing _between_ the columns (gutter) _without_ increasing the spacing between those columns and the table itself. Is there a way...
1
by: replyrpatil | last post by:
What I am trying to do: I need to print a compact access report (font 6 size) created using RTF2 program developed by Stephen Lebans to generate a TIF image of custom size (5.5 in x 2.0 in) ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.