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

How to allow to user to add records to GCC?

Thread ID:





81384 May 19,2009 07:29 PM UTC May 22,2009 09:31 AM UTC WinForms 3
Tags: GridControl
Vladimir Shcherbina
Asked On May 19, 2009 07:29 PM UTC


I want to provide user with a ability to add records (initially empties) to the GCC.
User will be able to press some small button in the GCC and add empty record. Then user can either fill it and save or switch to another grid (hide the whole grid and show another one). In case that user will return to the first grid, added records will be preserved. Any ideas?
I would greatly appreciate your help in this issue.
Best Regards,

Rajadurai C [Syncfusion]
Replied On May 20, 2009 02:29 PM UTC

Hi Vladimir,

Thanks for your interest in Syncfusion products.

Please refer to the following sample in which this has been implemented.

In this sample, two datatables have been used. At runtime, new rows are added to the grid and editing can be made. When the second datatable is binded to the same grid, the rows which are added before remains saved in the first datasource. On rebinding the first one, the grid get loaded with saved(newly added) records.


Vladimir Shcherbina
Replied On May 20, 2009 04:19 PM UTC


Many thanks for your answer.
Actually I don't need to svae newly added record to the database yet. I need to know the following:

1) Which GGC callback (if any) will be called (and can it be overriden?), if user adds new record
2) Why GCC is not saving this record automatically. Every time that I switch to another grid and return back (by hiding the previous one and showing the new one) the added record is disappearing. How to change this behaviour withour updating GGC datasource?

Many thanks for your answers.
Best Regards,


Rajadurai C [Syncfusion]
Replied On May 22, 2009 09:31 AM UTC

Hi Vladimir,

Thanks for your update.

1) The SourceListRecordChanged and SourceListListChanged events get triggerred once a new record has been added or a change to a record is made at grid level. Please refer to the following event handlers.

this.gridGroupingControl1.SourceListRecordChanged += new RecordChangedEventHandler(gridGroupingControl1_SourceListRecordChanged);
this.gridGroupingControl1.SourceListListChanged += new TableListChangedEventHandler(gridGroupingControl1_SourceListListChanged);

2) GridGroupingControl is a bounded one. When you made any changes in the grid, the underlying datasource get updated and it reflects the update in grid on leaving the current record after editing. This is the behavior of gridgroupingcontrol. Here the underlying datasource get updated means only the datastore binded to it. The original datasource cannot get updated by default. Hence after rebinding the grid with same datasource or closing the grid window and reopening, the data which are displayed initially in grid get displayed.

Switch to another grid and return back- will it mean changing datasource binded to grid or two seperate grids? Because hiding one grid and showing the other , doesn't make the grid to lose any change made into it.



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