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.
I would like to create an empty DataRowView object that has the same columns as a GridDataBoundGrid. I do not want to use AddNew as I do not want the object to be added right away to the GridDataBoundGrid.
J.J.Nagarajan Syncfusion Team November 1, 2007 12:10 AM UTC
Hi Stephane ,
You can disable the AddNewRow by setting false to gridDataBoundGrid1.EnableAddNew property. You can use the following code snippet to have a empty data grid view.
[C#] CurrencyManager cm = (CurrencyManager)this.gridDataBoundGrid1.BindingContext[gridDataBoundGrid1.DataSource, gridDataBoundGrid1.DataMember]; DataView dv = cm.List as DataView; dv.Table.Rows.Add(new object[] { });
Please let me know if this helps
Regards, Nagaraj
SDStephane DapsanseNovember 1, 2007 01:43 PM UTC
Hi Nagaraj,
Correct me if I am wrong but: DataView dv = cm.List as DataView dv.Table.Rows.Add(new object[] { }); will add a row to to the dataview.
I need to get a standalone DataRowView that has the same colllectio of columns as the dataview. I need something like: DataRowView drv = dv.Table.NewRowView();
Is it possible? Thanks, Stephane
HAhaneefm Syncfusion Team November 1, 2007 07:04 PM UTC
Hi Stephane,
Please try these code and let me know if this helps.
CurrencyManager cm = this.BindingContext[this.gridGroupingControl1.DataSource] as CurrencyManager; DataView dv = cm.List as DataView; DataRowView drv = dv.AddNew();