من یک dataRow رو به صورت public static تعریف کرد و در فرم دیگه ازون استفاد میکنم وقتی میخوام ازون استفاده کنم خطای زیر رو میده،مشکل از کجاست؟
فرم 1(editFactor):
if (dt.Rows.Count != 0)
{
current = dataGrdView.SelectedRows[0].DataBoundItem asDataRowView;
_CurrentRow2 = current.Row;
}
فرم 2:
txtname.Text = EditFactor._CurrentRow2["customerName"].ToString();
Error:This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.