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

Add new row

Thread ID:





12388 Mar 29,2004 07:06 AM UTC Mar 29,2004 07:30 AM UTC WinForms 1
Tags: GridControl
Ionut Balas
Asked On March 29, 2004 07:06 AM UTC

Dear Sir, I have a GridDataBoundGrid on a form, and I set the EnableAddNew = false and I use a button to add rows with the following code: this.grid.Binder.EnableAddNew = true; this.grid.Binder.AddNew(); this.grid.Binder.EnableAddNew = false; this.grid.Refresh(); But I have a problem: I add a row and I make some changes in this row. If I add a new row with the same mechanism the changes in the anterior row are lost and the row is initialized with the default values. I want all changes I make to remain when I add a row.Thank you

Administrator [Syncfusion]
Replied On March 29, 2004 07:30 AM UTC

Before doing the code to add the new row, call this.grid.Binder.EndEdit() to tell the grid to save any open changes. You also may want to first call this.grid.CurrentCell.EndEdit() if you are alolowing teh user to type into the grid to add the new values. Or, you can just add the row directly to the DataSource and not use the grid at all.


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