Increase Width of GridView Column

D

dmbuso

How do I increase the default width of a gridview column (just one column,
the 10th column, named "Notes")?

In design mode, I changed the width properties of the HeaderStyle,
ControlStyle, and ItemStyle to 300 px and set Wrap to False for the
HeaderStyle and ItemStyle. When I accept settings the "Notes" field widens in
design mode but when I run the web site, the Notes field is back to default
width.

PS - My gridview is bound to SqlDataSource1 which is a SELECT statement to a
SQL Server 2005 database table.
 
B

Bob Barrows [MVP]

dmbuso said:
How do I increase the default width of a gridview column (just one
column, the 10th column, named "Notes")?

In design mode, I changed the width properties of the HeaderStyle,
ControlStyle, and ItemStyle to 300 px and set Wrap to False for the
HeaderStyle and ItemStyle. When I accept settings the "Notes" field
widens in design mode but when I run the web site, the Notes field is
back to default width.

PS - My gridview is bound to SqlDataSource1 which is a SELECT
statement to a SQL Server 2005 database table.

There was no way for you to know it (except maybe by browsing through some
of the previous questions in this newsgroup before posting yours - always a
recommended practice) , but this is a classic (COM-based) asp newsgroup.
ASP.Net bears very little resemblance to classic ASP so, while you may be
lucky enough to find a dotnet-knowledgeable person here who can answer your
question, you can eliminate the luck factor by posting your question to a
group where those dotnet-knowledgeable people hang out. I suggest
microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.
 

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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top