asp.net.ph

DataView Constructor

System.Data Namespace   DataView Class


Initializes a new instance of the DataView class.

Overload List

1. Initializes a new instance of the DataView class.

2. Initializes a new instance of the DataView class with the specified DataTable.

3. Initializes a new instance of the DataView class with the specified DataTable, RowFilter, Sort, and DataViewRowState.


Example

The following example initializes a new DataView with a given DataTable, RowFilter, Sort, and DataViewRowState.

NOTE: This example uses one of the overloaded versions of the DataView constructor. For other examples that may be available, see the individual overload topics.

private void MakeDataView ( DataSet ds ) {
   DataView dv = new DataView ( ds.Tables [ "Suppliers" ], 
      "Country = 'UK'", "CompanyName", DataViewRowState.CurrentRows );
   dv.AllowEdit = true;
   dv.AllowNew = true;
   dv.AllowDelete = true;
}
  C# VB

See Also

DataView Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph