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

Attaching row?

Thread ID:





34078 Sep 1,2005 01:56 PM UTC Sep 2,2005 03:54 PM UTC WinForms 3
Tags: GridControl
Asked On September 1, 2005 01:56 PM UTC

When the GDBG is allowed to have a new row added, that row remains detached until the user leaves the row. This is causing me much grief in getting the grid to refresh properly when attempting to manipulate the datarow. Is there a way to force the detached row to be added to the table? Thanks, Virgil

Replied On September 1, 2005 02:25 PM UTC

Side question. Are Binder.DirectSaveCellInfo and Binder.DefaultCurrentRecordItemChangedBehavior = GridCurrentRecordItemChangedBehavior.ReloadCurrentRecord opposites?

Administrator [Syncfusion]
Replied On September 1, 2005 04:02 PM UTC

I am not sure if this is what you want, but you can handle the RowEnter event and if you are entering the AddNewRow, go ahead and add a new row yourself.
private void gridDataBoundGrid1_RowEnter(object sender, GridRowEventArgs e)
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	if(e.RowIndex == this.gridDataBoundGrid1.Model.RowCount)
		DataTable dt = this.gridDataBoundGrid1.DataSource as DataTable;
I would not exactly say those two properties are opposite. DefaultCurrentRecordItemChangedBehavior controls what happens if you are actively editing a grid cell, and something outside the grid changes the IBindingList datasource. DirectSaveCellInfo = true raises an IBindingList ItemChanged event each time you change cells even if you are moving in the same row. The default behavior is to only rasie the event when the position in the data list changes.

Replied On September 2, 2005 03:54 PM UTC

This seemed to work for me: GridDataBoundGrid1.CommitChanges() One that happened, I could work directly with the datarow and things would appear properly on the grid.


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