RecordStateChanged Object reference not set to an instance

S

Sankar Nemani

Object reference not set to an instance of an object.
at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState
oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState
oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
DataRowAction action, Boolean isInMerge)
at System.Data.DataRow.SetNewRecord(Int32 record)
at System.Data.DataRow.EndEdit()
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRowView.SetColumnValue(DataColumn column, Object
value)
at System.Data.DataRowView.set_Item(String property, Object value)
at Lumedx.CardioDoc.UDF.CheckBoxAdapter.checkBox_CheckStateChanged(Object
sender, EventArgs e)

I get the above exception when I try to change the value of a column of a
data row view in the CheckStaeChanged event. The column is the same one the
checkbox's CheckState is bound to.
 
V

Val Mazur \(MVP\)

Hi Sankar,

This error means that your reference to the datarow or datacolumn probably
is Nothing and you try to change a value for it. Try to debug a code and see
if it is not a Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top