J
J Gao
Hi All,
I am using Data binding with DataGrid. I need to hide column in the grid
using
DataGrid1.Columns(1).Visible = False
But I get the following error message
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of
range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 119:
Line 120: Private Sub Button1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Button1.Click
Line 121: DataGrid1.Columns(1).Visible = False
Line 122: End Sub
Line 123:
It seems that Datagrid does not recognize the columns created at runtime.
Any idea how to do this?
Thanks in advance.
Jie
I am using Data binding with DataGrid. I need to hide column in the grid
using
DataGrid1.Columns(1).Visible = False
But I get the following error message
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of
range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 119:
Line 120: Private Sub Button1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Button1.Click
Line 121: DataGrid1.Columns(1).Visible = False
Line 122: End Sub
Line 123:
It seems that Datagrid does not recognize the columns created at runtime.
Any idea how to do this?
Thanks in advance.
Jie