Home All Groups Group Topic Archive Search About
Author
4 May 2005 4:14 PM
Kenoben
Hi,

Can anyone suggest how I might set the property "Visible=False" of a
datagrid's column.

Important : We are using a DataSet intialized with an XML File, to feed the
Datagrid.

The debugger shows this error :
<<
Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index
>>

Thanks in advance,

Best Regards,

Kenoben

Author
6 May 2005 12:40 PM
Elton W
Hi Kenoben,

You can use

c#
datagrid.Columns[col_index].Visible = false

VB.NET
datagrid.Columns(col_index).Visible = False

It doesn't matter you use XML, db, or other data source to
fill dataset as datagrid's data source.

HTH

Elton Wang
elton_w***@hotmail.com


>-----Original Message-----
>Hi,
>
>Can anyone suggest how I might set the
property "Visible=False" of a
>datagrid's column.
>
>Important : We are using a DataSet intialized with an XML
File, to feed the
>Datagrid.
>
>The debugger shows this error :
><<
>Index was out of range. Must be non-negative and less
than the size of the
Show quoteHide quote
>collection. Parameter name: index
>>>
>
>Thanks in advance,
>
>Best Regards,
>
>Kenoben
>
>.
>