AD
Administrator
Syncfusion Team
November 19, 2007 05:20 PM UTC
Try the SourceListListChangedCompleted event and check for e.ListChangedType = ItemAdded.
//subscribe to the event
this.grid.SourceListListChangedCompleted += new TableListChangedEventHandler(grid_SourceListListChangedCompleted);
//the handler code
void grid_SourceListListChangedCompleted(object sender, TableListChangedEventArgs e)
{
if (e.ListChangedType == ListChangedType.ItemAdded)
{
}
}
AD
Administrator
Syncfusion Team
November 19, 2007 05:36 PM UTC
To actually easily track the new record and set it current, you can use the SourceListRecordChanged event in addition to the SourceListListChangedCompleted event.
Record changedRecord = null;
void gridGroupingControl1_SourceListRecordChanged(object sender, Syncfusion.Grouping.RecordChangedEventArgs e)
{
changedRecord = e.Record;
}
void gridGroupingControl1_SourceListListChangedCompleted(object sender, Syncfusion.Grouping.TableListChangedEventArgs e)
{
if (e.ListChangedType == ListChangedType.ItemAdded && changedRecord != null)
changedRecord.SetCurrent();
}