I'm talking about a DataGrid in Windows Forms - not a DataGridView.
I've got some code below which doesn't work. It's erroring out on the 2nd
line.
Dim myGridColumns As GridColumnStylesCollection
myGridColumns = dgCustomerList.TableStyles(0).GridColumnStyles
myGridColumns.Item(1).Width = 200
myGridColumns.Item(2).Width = 250
myGridColumns.Item(3).Width = 250
myGridColumns.Item(4).Width = 100
myGridColumns.Item(5).Width = 100
myGridColumns.Item(6).Width = 200
myGridColumns.Item(7).Width = 200
myGridColumns.Item(8).Width = 200
"Aflava" wrote:
> Hi,
>
> Are you talking about a DataGrid or a DataGridView?
> You have a Width property for DataGridViewColumn (and should be the same for
> datagrid).
>
>
> --
> Aflava
> Windows Forms Components
> http://www.aflava.com
>
> "Jennifer Hinojosa" <Jennifer (E-Mail Removed)> wrote in
> message news:B6B1D8A4-6E1B-4046-91AF-(E-Mail Removed)...
> > Will someone please help me out by telling me how to set the width of a
> > column in a datagrid using VB?
> >
> > Thanks for your help!
> >
> > Jennifer
>
>
>