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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Creating a standalone DataRowView

Thread ID:





69541 Oct 31,2007 07:13 PM UTC Nov 1,2007 07:04 PM UTC WinForms 3
Tags: GridControl
Stephane Dapsanse
Asked On October 31, 2007 07:13 PM UTC


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.Nagarajan [Syncfusion]
Replied On 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.


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


Stephane Dapsanse
Replied On 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?

haneefm [Syncfusion]
Replied On 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,


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