Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hi all,

I just want to know all the reasons why a call to a datagrid.row.add(drRow) raises an exception and hence crash .

I am facing this situation when adding some rows in the datagrid .

It raises exception " Access reading violation 0x0000000000"

What I have tried:

I tried clearing the datagrid before populating it but no help.
Actually the situation is this .I have a tree structure which has some nodes and these same nodes with the properties values gets populated into the datagrid .
Now whenever I sort the data in the datagrid by click on its header and then click the root node in the tree structure it crashes and the crash happens at this position where I populate the datagrid .
The same thing does not happen when I click on the root node without sorting the datagrid.
Posted
Updated 1-Apr-18 23:48pm
v4
Comments
Richard MacCutchan 2-Apr-18 3:09am    
Most likely you have a null reference somewhere. Use your debugger to find out where.
GKP1992 2-Apr-18 3:48am    
Shouldn't this be datagrid.rows.add(drRow)?
iampradeepsharma 2-Apr-18 4:11am    
Yes it is ..sorry for the typo .But in actual code it is .rows only.
iampradeepsharma 2-Apr-18 5:49am    
what does it mean " object reference not set to an instance of an object" in the case of adding row in the datagrid ?
iampradeepsharma 2-Apr-18 5:49am    
what does it mean " object reference not set to an instance of an object" in the case of adding row in the datagrid ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900