Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > DG Column Width vs Table Column Width

Reply
Thread Tools

DG Column Width vs Table Column Width

 
 
Carl Howarth
Guest
Posts: n/a
 
      10-22-2004
Hi,

I am wanting to display data in a datagrid with additional header rows above
it that categorise some of the main headers of the datagrid. I am therefore
creating a table above the datagrid using the same padding/spacing options.

The problem I am having is that when I define the width of a TD in my table
to be, say 300px, that should cover 3 columns of the datagrid, each at 100px
wide they are always misaligned and I have to start taking a pixel off here
and there within my header table. Also, the vertical space between the 2 is
usually larger than the cellspacing, which is livable though it would be
nice to know how to stop this!

Surely if I am defining the width of anything in pixels, it should be
displayed at the same width regardless of the object's type?!

Any advice would be gratefully received.

Thanks, Carl
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      10-24-2004
Carl,

When in comes to column width, the browser considers your instructions as
recommendations. You are not in control. Let the browser decide on the
column width and then resize the columns for the additional header in a
javascript.

Eliyahu

"Carl Howarth" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I am wanting to display data in a datagrid with additional header rows

above
> it that categorise some of the main headers of the datagrid. I am

therefore
> creating a table above the datagrid using the same padding/spacing

options.
>
> The problem I am having is that when I define the width of a TD in my

table
> to be, say 300px, that should cover 3 columns of the datagrid, each at

100px
> wide they are always misaligned and I have to start taking a pixel off

here
> and there within my header table. Also, the vertical space between the 2

is
> usually larger than the cellspacing, which is livable though it would be
> nice to know how to stop this!
>
> Surely if I am defining the width of anything in pixels, it should be
> displayed at the same width regardless of the object's type?!
>
> Any advice would be gratefully received.
>
> Thanks, Carl
> (E-Mail Removed)
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
picture width decides table column width David Basford HTML 3 09-30-2007 10:49 PM
How to set table column width except the last column? Cal Java 1 01-08-2007 06:55 AM
Problem with comparing a Table View Column with the Table Column? savvy ASP .Net 1 01-18-2006 03:04 PM
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM



Advertisments