K
Karim
I have a datagrid with a collection of columns and the datagrid is
populated as in the code below. The value of test = 3 rows which is
correct. However I get an exception when the code hits the Databind line.
When I removed all the columns and dg is left with <columns></columns>, I
don't get an error. If there's any column in the collection no matter what
column it is, the error comes back. All the datafield names correspond to
the column names and the code worked before. What kind of troubleshooting
or debugging methods should I go about? The databind() seems to me like a
blackbox and it's doing stuff which I don't seem to be aware of.
TIA.
<asp:datagrid..... AutoGenerateColumns="False" DataKeyField="msid">
....
DataTable dtMembers = oMembers.SelectAll();
int test = dtMembers.Rows.Count;
dgMemberList.DataSource = dtMembers;
dgMemberList.DataBind();
populated as in the code below. The value of test = 3 rows which is
correct. However I get an exception when the code hits the Databind line.
When I removed all the columns and dg is left with <columns></columns>, I
don't get an error. If there's any column in the collection no matter what
column it is, the error comes back. All the datafield names correspond to
the column names and the code worked before. What kind of troubleshooting
or debugging methods should I go about? The databind() seems to me like a
blackbox and it's doing stuff which I don't seem to be aware of.
TIA.
<asp:datagrid..... AutoGenerateColumns="False" DataKeyField="msid">
....
DataTable dtMembers = oMembers.SelectAll();
int test = dtMembers.Rows.Count;
dgMemberList.DataSource = dtMembers;
dgMemberList.DataBind();