C
Chris Alm
I am trying to figure out how to get the events for a table to NOT fire.
Please take a look at the example code below. No matter how I do it the
event still fire. What am I doing wrong?
Please someone respond, this is killing an arch. design in a application I
am working on.
DataSet ds = new DataSet();
//FIRST TRY
ds.Tables.Add(new DataTable());
ds.Tables[0].RowChanged +=new DataRowChangeEventHandler(Form1_RowChanged);
ds.Tables[0].BeginLoadData();
DataRow dr = ds.Tables[0].NewRow();
ds.Tables[0].Rows.Add(dr);
ds.AcceptChanges();
ds.Tables[0].EndLoadData();
ds.Clear(); //CLEAR
//START SECOND TRY
ds.Tables[0].Clear();
ds.Tables[0].BeginLoadData();
dr = ds.Tables[0].NewRow();
ds.Tables[0].LoadDataRow(dr.ItemArray,true);
ds.Tables[0].EndLoadData();
Please take a look at the example code below. No matter how I do it the
event still fire. What am I doing wrong?
Please someone respond, this is killing an arch. design in a application I
am working on.
DataSet ds = new DataSet();
//FIRST TRY
ds.Tables.Add(new DataTable());
ds.Tables[0].RowChanged +=new DataRowChangeEventHandler(Form1_RowChanged);
ds.Tables[0].BeginLoadData();
DataRow dr = ds.Tables[0].NewRow();
ds.Tables[0].Rows.Add(dr);
ds.AcceptChanges();
ds.Tables[0].EndLoadData();
ds.Clear(); //CLEAR
//START SECOND TRY
ds.Tables[0].Clear();
ds.Tables[0].BeginLoadData();
dr = ds.Tables[0].NewRow();
ds.Tables[0].LoadDataRow(dr.ItemArray,true);
ds.Tables[0].EndLoadData();