MaxPayne

MaxPayne

  • NA
  • 18
  • 18k

handling Null reference Exception

Aug 6 2012 8:41 AM

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)