gridview resize at runtime after databound

Fraser_Admin
Fraser_Admin used Ask the Experts™
on
i have a gridview which is most of the time larger than the viewable page.  i don't like how it shrinks your columns to fit the grid to the page.  but if i set a static size for the grid, then there is whitespace added to the columns.

how at runtime can i figure out the max space needed for each column, then resize my gridview and columns appropriately?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Analyst Programmer
Commented:
Computing the viewable page is quite complicated (and probably useless).

Instead, in the gridview's BoundField or TemplateFiled, try set the property ItemStyle-Wrap to "false" to achieve your goal.

Author

Commented:
that doesn't seem to change anything?
David RobitailleAnalyst Programmer

Commented:
need some code, screenshot or anything to work with...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial