Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Resize Gridview width (not column width) based on size of databrought back.

Reply
Thread Tools

Resize Gridview width (not column width) based on size of databrought back.

 
 
Hartman_Ralph@Hotmail.com
Guest
Posts: n/a
 
      06-09-2009
Does anyone know of a way to resize a gridview based on the size of
the data being placed inside the gridview. For example my gridview is
populated dynamically from any number of different tables. Some with
only a few columns and some with many columns with large amounts of
data. I want to have the gridview property Gridview1.Width =
Unit.Pixel(400) when small and something like Gridview1.Unit.Pixel
(900) when many columns are brought back.

Thanks in advance for the help.

http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Stan
Guest
Posts: n/a
 
      06-13-2009
On 9 June, 06:06, (E-Mail Removed) wrote:
> Does anyone know of a way to resize a gridview based on the size of
> the data being placed inside the gridview. *For example my gridview is
> populated dynamically from any number of different tables. *Some with
> only a few columns and some with many columns with large amounts of
> data. *I want to have the gridview property Gridview1.Width =
> Unit.Pixel(400) when small and something like Gridview1.Unit.Pixel
> (900) when many columns are brought back.
>
> Thanks in advance for the help.
>
> (E-Mail Removed)


Use the GridVIew1.Columns.Count property during the
GridView1.DataBound event to decide what value to set GridView1.Width
 
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
Dynamically Resize Gridview Width Property (NOT Column Width) Hartman_Ralph@Hotmail.com ASP .Net 0 06-02-2009 03:59 PM
Resize Iframe width on change of gridview width gary.comstock@gmail.com ASP .Net 1 01-09-2007 08:40 PM
Resize Iframe width on change of gridview width gary.comstock@gmail.com ASP .Net 0 01-09-2007 07:05 PM
DG Column Width vs Table Column Width Carl Howarth ASP .Net Datagrid Control 1 10-24-2004 08:48 AM
How can I resize a JTable's column width? gajo Java 2 06-25-2004 08:49 PM



Advertisments