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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Grouping Control New Row Refresh from underlying data source object

Thread ID:





20723 Oct 24,2004 12:07 PM UTC Oct 24,2004 09:44 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On October 24, 2004 12:07 PM UTC

Hi I''m using the GridGrouping Control and using an IBindingList to attach to the DataSource. When I enter data in col1 of a "*" new row (Record), I update the underlying data object for col2 directly. The value of which should be displayed in col2. However the new row (Record) does not show the updated col2 value which I updated in the underlying data object. How can I get the "*" new row record to be refreshed from the underlying data object, such that when I make changes to the underlying "*" new row Record object, I get the changes reflected in the "*" new row record.

Administrator [Syncfusion]
Replied On October 24, 2004 01:00 PM UTC

Here is a little sample. It calls EndEdit on the AddNewRecord so your can then update it from outside the grid. GGCNewRow_8486.zip

Administrator [Syncfusion]
Replied On October 24, 2004 08:00 PM UTC

Hi Clay, Thanks for getting back so soon, I had a look at your sample, it''s not entirely what I want to do. What I would like to do is have the all the changes to the underlying data object appear on the "*" new row, rather than appear on another row on the grid once the user has pressed enter on the row. I want to be able to see values in dependent cells on the "*" new row and then at the end hit enter to create a new row in the underlying data source. Thanks John

Administrator [Syncfusion]
Replied On October 24, 2004 09:44 PM UTC

Try handling TableControlCurrentCellChanged and add the valuse at that point. Also handle TableControlCurrentCellMoved to reset a bool flag that makes sure you only add the values once. Here are handlers that you can add to the above sample (you also need to subscribe to the two events.)
private bool addedValuesInNewRow = false;
private void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
	if(e.TableControl.CurrentCell.MoveToRowIndex != e.TableControl.CurrentCell.MoveFromRowIndex)
		addedValuesInNewRow = false;
private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e)
	if(this.gridGroupingControl1.Table.AddNewRecord.IsEditing && !addedValuesInNewRow)
		this.gridGroupingControl1.Table.AddNewRecord.SetValue("Col2", r.Next(1000)); 
		this.gridGroupingControl1.Table.AddNewRecord.SetValue("Col3", r.Next(1000)); 
		addedValuesInNewRow = true;


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

Live Chat Icon For mobile
Live Chat Icon