Answered by:
Datagrid Nested Issue

Question
-
Hi,
I code a Nested datagrid, using VS 2010, but i am getting error:"Object Reference not set to an instance of an object"; so any body can explain me how i can set this issue: I am using
data.Relations.Add(
"Details", data.Tables("Customer").Columns("CID"), data.Tables("Payment").Columns("CID"))
Regards
Shoaib
ShoaibA ShaikhThursday, December 22, 2011 1:49 PM
Answers
-
Make sure the TableName and ColumnName in the parameter are correct. Possibly "data" dataset doesn't contain table with name Customer or Payment. Try debugging the two parameters.
Gaurav Khanna | Microsoft VB.NET MVPThursday, December 22, 2011 7:10 PM -
Hi Shoaib,This error message means the code is trying to access a member of a reference type variable that is set to null. Please debug your code and make sure all the objects used are not null.I think this article can make it clearer:Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marked as answer by Bob Wu-MT Friday, January 6, 2012 3:06 AM
Friday, December 23, 2011 8:05 AM
All replies
-
Make sure the TableName and ColumnName in the parameter are correct. Possibly "data" dataset doesn't contain table with name Customer or Payment. Try debugging the two parameters.
Gaurav Khanna | Microsoft VB.NET MVPThursday, December 22, 2011 7:10 PM -
Hi Shoaib,This error message means the code is trying to access a member of a reference type variable that is set to null. Please debug your code and make sure all the objects used are not null.I think this article can make it clearer:Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marked as answer by Bob Wu-MT Friday, January 6, 2012 3:06 AM
Friday, December 23, 2011 8:05 AM