G
Guest
I need help with a strange problem occuring when trying to set values in a DataRowView
To put the problem in context
I am hooking up to the ListChanged event of a DataView. When a new row is added I have a method called from the event handler to populate every row in the DataView with some data, column by column. I am trying to set a value in several of the columns (eg dataView[0][21] = <my new value>). This works for the first column that I set, but on the next column it throws an exception "Object reference not set to an instance of an object"
This problem mostly seems to happen on the first row being added, although it does occasionaly happen at other times
Is this a bug, or am I doing something wrong?
To put the problem in context
I am hooking up to the ListChanged event of a DataView. When a new row is added I have a method called from the event handler to populate every row in the DataView with some data, column by column. I am trying to set a value in several of the columns (eg dataView[0][21] = <my new value>). This works for the first column that I set, but on the next column it throws an exception "Object reference not set to an instance of an object"
This problem mostly seems to happen on the first row being added, although it does occasionaly happen at other times
Is this a bug, or am I doing something wrong?