We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

grid row number

Hi,

How to get the row number of the newly inserted row?



1 Reply

AD Administrator Syncfusion Team January 16, 2007 05:19 PM UTC

Hi Arvind,

To get the newly added row position in a grid, you need to handle the BindingListChanged event of the GridBinder.

//subscribe the event...
this.gridDataBoundGrid1.Binder.BindingListChanged +=new ListChangedEventHandler(Binder_BindingListChanged);

private void Binder_BindingListChanged(object sender, ListChangedEventArgs e)
{
if( e.ListChangedType == ListChangedType.ItemAdded )
{
Console.WriteLine("Old Index:" + e.OldIndex);
Console.WriteLine("New Index:" + e.NewIndex);
}
}

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon