J
Julia B
Hi
I've just moved from asp.net 1.1 to 2.0 so am new to gridviews and have a
problem.
I've got a gridview on a form in a web layer project. It has an
objectdatasource object which calls a method in a class in a seperate data
layer project.Therefore the columns are autogenerated. The problem I've got
is that the data that fills the gridview has an "id" column which I don't
want to display but I do want to use programmatically. I've tried hiding &
removing the column but, wherever I put the code, I get an "Argument out of
range" error. My code is:
Me.UserGridView.Columns.RemoveAt(1)
I've tried this in Page Load, Page LoadComplete etc etc.... to no avail.
There is no code on the page to populate the GridView, it's all done through
VisualStudio's ObjectDataSource object properties.
Any clues on how to resolve this would be greatly appreciated.
Thanks
Julia
I've just moved from asp.net 1.1 to 2.0 so am new to gridviews and have a
problem.
I've got a gridview on a form in a web layer project. It has an
objectdatasource object which calls a method in a class in a seperate data
layer project.Therefore the columns are autogenerated. The problem I've got
is that the data that fills the gridview has an "id" column which I don't
want to display but I do want to use programmatically. I've tried hiding &
removing the column but, wherever I put the code, I get an "Argument out of
range" error. My code is:
Me.UserGridView.Columns.RemoveAt(1)
I've tried this in Page Load, Page LoadComplete etc etc.... to no avail.
There is no code on the page to populate the GridView, it's all done through
VisualStudio's ObjectDataSource object properties.
Any clues on how to resolve this would be greatly appreciated.
Thanks
Julia