The grid has the problem of postponing the actual adding of the row. So, if you wanted to set defaluts in the grid, you would likely need to do that prior to the user typing into the new row. But, by default, the new row is not really in the DataTable at this point, and trying to add default values for fields not in the grid would be a problem. The above code works around this problem.
If you want to use a DataSource event to manage setting default values (whether they are in the grid or not), you can catch the IBindingList.ListChanged event on the List member of the CurrencyManager. Below are some snippets.
I have forwarded your request for a special grid event to try to manage this task to the grid architect to see if this is something we want to do.
CurrencyManager cm = (CurrencyManager) this.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember];
IBindingList ibl = cm.List as IBindingList;
ibl.ListChanged += new ListChangedEventHandler(ibl_ListChanged);
private void ibl_ListChanged(object sender, ListChangedEventArgs e)
{
if(e.ListChangedType == ListChangedType.ItemAdded)
{
DataView dv = sender as DataView;
dv[e.NewIndex]["col0"] = "aaaaa";
dv[e.NewIndex]["col1"] = "bbbbb";
}
}