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

Add new row

Thread ID:

Created:

Updated:

Platform:

Replies:

12388 Mar 29,2004 02:06 AM Mar 29,2004 02:30 AM Windows Forms 1
loading
Tags: GridControl
Ionut Balas
Asked On March 29, 2004 02:06 AM

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 02:30 AM

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.

CONFIRMATION

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.

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.

;