Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Increase Width of GridView Column

Reply
Thread Tools

Increase Width of GridView Column

 
 
dmbuso
Guest
Posts: n/a
 
      08-24-2008
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.

--
Dave B.
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      08-24-2008
dmbuso wrote:
> 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.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
dmbuso
Guest
Posts: n/a
 
      08-24-2008
Sorry, I will post this to the microsoft.public.dotnet.framework.aspnet
newsgroup.
--
Dave B.
 
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
Resize Gridview width (not column width) based on size of databrought back. Hartman_Ralph@Hotmail.com ASP .Net Web Controls 1 06-13-2009 10:21 AM
Dynamically Resize Gridview Width Property (NOT Column Width) Hartman_Ralph@Hotmail.com ASP .Net 0 06-02-2009 03:59 PM
Increase Gridview Column Width dmbuso ASP .Net 1 08-25-2008 10:28 AM
DG Column Width vs Table Column Width Carl Howarth ASP .Net Datagrid Control 1 10-24-2004 08:48 AM
How to increase or decrease the width of the column in datagrid Sivaraman.S ASP .Net Datagrid Control 1 10-18-2004 03:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57