Lets say I added a row, and a required field is missing, so I alert the user, I want to keep the values the same, but after the alert values disappear. Here is the code, how i tried to return values
01.
if (!String.IsNullOrEmpty(newItem.stCountryName))
02.
dr.Cells["column1"].Value = newItem.stCountryName;
03.
//((CountryTable)dr.DataBoundItem).stCountryName = newItem.stCountryName;
04.
if (!String.IsNullOrEmpty(newItem.stCountryCode))
05.
((CountryTable)dr.DataBoundItem).stCountryCode = newItem.stCountryCode;
06.
if (newItem.nCodeLen != null)
07.
((CountryTable)dr.DataBoundItem).nCodeLen = newItem.nCodeLen;
08.
if (newItem.nRegionID != null)
09.
((CountryTable)dr.DataBoundItem).nRegionID = newItem.nRegionID;