DataGrid - Headertext Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I try to change the header text after Databind for a column (ASP.Net) I am getting the following error
dgTest.Columns(0).HeaderText = "TEST#

Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

PS: I am using ASP.Net 2002 with servicepack
 
Hi Chan,

Did you check by deleting this row if your Datagrid is loading?

Cor
When I try to change the header text after Databind for a column (ASP.Net)
I am getting the following error:
dgTest.Columns(0).HeaderText = "TEST#"

Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index
 
Hi Cor

Datagrid load the data with the header as the column name
But I want to change the header
So I tried to us
dgTest.Columns(0).HeaderText = "TEST#
to set my header instead of the database column name
But this is not working

Please let me know how to set the headertext right in the VB module without the scripts
Thanks in advanc
Chan
 
Cor & All

I actually used that information
So I had something like this in my cod
dgTest.Columns(0).HeaderText = "TEST#

But this throw error lik
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Thanks in advanc
Chan
 
Back
Top