1
Answer

handling Null reference Exception

MaxPayne

MaxPayne

12y
1.6k
1

Hello

I am having problem with this exception "NullReferenceException was unhandled"
i am using this the following method "foreach (DataRow row in ((DataTable)ulDisplay.DataSource).GetChanges().Rows)" to get changes from grid

my goal is
if( flag == 1)
 {
//no change
}
else
{
 make changes only when there is chages on grid
foreach (DataRow row in ((DataTable)ulDisplay.DataSource).GetChanges().Rows)"
}
Answers (1)