Newcomer to ASP.NET here, I have a lot of archaic VB6 experience so I'm attempting to upgrade myself.
I'm having an issue with a DetailsView control, the same as described
here by nampark today.
I understand that setting AutoGenerateRows to False will resolve this issue, however this removes all of the fields from the control on page load, leaving just Insert and Cancel command buttons visible. Is there another way I can generate the field headings
for the control?
ryanjgillies
0 Points
7 Posts
DetailsView: Collection cannot be null. Parameter name: c
Jan 24, 2013 01:44 AM|LINK
Hi all,
Newcomer to ASP.NET here, I have a lot of archaic VB6 experience so I'm attempting to upgrade myself.
I'm having an issue with a DetailsView control, the same as described here by nampark today.
I understand that setting AutoGenerateRows to False will resolve this issue, however this removes all of the fields from the control on page load, leaving just Insert and Cancel command buttons visible. Is there another way I can generate the field headings for the control?
Thanks,
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: DetailsView: Collection cannot be null. Parameter name: c
Jan 26, 2013 01:21 AM|LINK
Hi,
If you set "AutoGenerateRows" to False, you have to define your own formation of the DetailsView, and then use <asp:BoundField……/>
or just use TemplateField by referring:
<asp:TextBox Text='<%#Bind("FieldName")%>'……/>
For field headlines, you have to write one by one manually.