Now I have
var row = container.Tables[name].NewRow();
row[0] = time;
row[1] = val;
container.Tables[name].Rows.Add(row);
Of course event DataTableNewRowEvent
is fired in first line. But I need fire them after last line, I mean after adding new row to RowsCollection
. How to make it? I need it to get actual data in DataTable
at the moment of firing DataTableNewRowEvent
I think about:
//to insert proper data
var row = container.Tables[name].NewRow();
row[0] = time;
row[1] = val;
container.Tables[name].Rows.Add(row);
//to fire event
container.Tables[name].Rows.Remove(container.Tables[name].NewRow());
but probably it's not best solution.