The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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.