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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG new item event

Thread ID:





96678 Sep 28,2010 06:16 AM UTC Oct 12,2010 05:45 AM UTC WinForms 3
Tags: GridControl
nazmi anuar
Asked On September 28, 2010 06:16 AM UTC

hi there,
Soo when im using GridDataBoundGrid and set the EnableAddNew property to true, what event should i subscribe to so that i can detect when user adding new item (by writing cell on the last row). So that i can customize the creation of the new item in the collection.

Christopher Issac Sunder K [Syncfusion]
Replied On October 4, 2010 01:33 PM UTC

Hi Nazmi,

Thank you for your interest in Syncfusion products.

You can make use of "SourceListRecordChanging" event to identify when the user added a new record into GridGroupingControl.

this.gridGroupingControl1.SourceListRecordChanging += new RecordChangedEventHandler(gridGroupingControl1_SourceListRecordChanging);

void gridGroupingControl1_SourceListRecordChanging(object sender, RecordChangedEventArgs e)
if (e.Action == RecordChangedType.Added)
Console.WriteLine("The New Record is : " + e.Record);
Console.WriteLine("New Record Added to index : " + e.NewIndex);

Please refer the following sample which illustrates the above.


Please let me know if this helps.


nazmi anuar
Replied On October 7, 2010 07:14 AM UTC

err look like GridDataBoundGrid does not have the same event.
for now i just use the event below..

void DataBoundGridModel_DataProviderSaveCellInfo(...)
if (this.Binder.IsAddNew)

Jisha Joy [Syncfusion]
Replied On October 12, 2010 05:45 AM UTC

Hi Nazmi,

You could hook into the CurrencyManager's ListChanged event to track the underlying datasources changes in GridDataBoungGrid. See the code to get the values of the newly added row.

CurrencyManager cm = this.gridDataBoundGrid1.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember] as CurrencyManager;
((DataView)cm.List).ListChanged += new ListChangedEventHandler(Form1_ListChanged);

private void Form1_ListChanged(object sender, ListChangedEventArgs e)
if(e.ListChangedType == ListChangedType.ItemAdded )
DataView dv = sender as DataView;
DataRowView drv = dv[e.NewIndex] as DataRowView;


Sample for your reference:


Please let me know if this helps.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon