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
SD
Stephane Dapsanse
November 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
HA
haneefm
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();
Best regards,
Haneef