System.Windows.Forms.CurrencyManager.AddNew Method

Adds a new item to the underlying list.

Syntax

public override void AddNew ()

Remarks

This method is supported only if the data source implements the System.ComponentModel.IBindingList interface and the data source allows adding rows (System.ComponentModel.IBindingList.AllowNew is true).

Note:

This property was designed to allow complex-bound controls, such as the System.Windows.Forms.DataGrid control, to add new items to list.

You typically use this property only if you are creating your own control that incorporates the System.Windows.Forms.CurrencyManager. Otherwise, to add items if the data source is a System.Data.DataView, use the System.Data.DataView.AddNew method of the System.Data.DataView class. If the data source is a System.Data.DataTable, use the System.Data.DataTable.NewRow method and add the row to the System.Data.DataRowCollection.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0