asp.net.ph

DataView Constructor ( DataTable )

System.Data Namespace   DataView Class


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

[ VB ]
Public Sub New ( _
   ByVal table As DataTable _
)

[ C# ]
public DataView (
   DataTable table
);

[ C++ ]
public: DataView (
   DataTable* table
);

[ JScript ]
public function DataView (
   table : DataTable
);

Parameters

table
A DataTable to add to the DataView.

Example

The following example initializes a new DataView with a given DataTable.

private void MakeDataView ( ) {
   DataView dv = new DataView ( ds.Tables [ "Suppliers" ] );
   // bind a ComboBox control to the DataView.
   Combo1.DataSource = dv;
   Combo1.DisplayMember = "Suppliers.CompanyName";
}
  C# VB

See Also

DataView Members   DataView Constructor Overload List 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