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

H

Hartman_Ralph

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 address removed)
 
S

Stan

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 address removed)

Use the GridVIew1.Columns.Count property during the
GridView1.DataBound event to decide what value to set GridView1.Width
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top