|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DatagridView Column HeadersHi
I've been looking through the properties and I can't seem to find a way to adjust the column width. Is there a way to do this? Also, when the datagridview is displaying data, there is a "column" on the far left used to select records. Is there any way to remove this column? Or change it's width to something smaller (like zero)? I appreciate your help very much. Thanks Jer On 25 Aug 2006 15:57:32 -0700, "jer84" <jerber***@gmail.com> wrote: You have to have some columns first before you can set a column width. If you added columns in>Hi > >I've been looking through the properties and I can't seem to find a way >to adjust the column width. Is there a way to do this? > Design, then you could have set the column width in the column's width property. >Also, when the datagridview is displaying data, there is a "column" on You must have missed the RowHeadersVisible Property while you were looking through the>the far left used to select records. Is there any way to remove this >column? Or change it's width to something smaller (like zero)? > DataGridView's property window. Gene Perhaps you can use the RowHeadersWidth properties, eg:
'RowHeadersWidth minimum is 4 DataGridView1.RowHeadersWidth = 4 'Then for your data column, try this (20 to give space to vertical scrollbar if it exists... DataGridView1.Columns(0).Width = DataGridView1.Width - DataGridView1. RowHeadersWidth - 20 HTH. -- Regards, Pedestrian, Penang. Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/200608/1 Thanks Gene,
I can now resize my columns. pedestrian via DotNetMonster.com wrote: > Perhaps you can use the RowHeadersWidth properties, eg: And thanks Pedestrian,> > 'RowHeadersWidth minimum is 4 > DataGridView1.RowHeadersWidth = 4 > > 'Then for your data column, try this (20 to give space to vertical scrollbar > if it exists... > DataGridView1.Columns(0).Width = DataGridView1.Width - DataGridView1. > RowHeadersWidth - 20 That worked for getting that first row out of the way! All issues are resolve and very quickly. Thanks again Jer
Saving changes made in DataGridView
hex to unicode: problem Atomic Operation? how to force a 'SyncWithCurrencyManager' update Generic collection question Are codes ran in try blocks expensive? how to make a mouseup event called only once during a double click event? in VB, String '=' is two orders of magnitude slower than .Equals! DefaultValueAttribute And Array Properties Strange float behaviour |
|||||||||||||||||||||||