asp.net.ph

DataView Constructor ( )

System.Data Namespace   DataView Class


Initializes a new instance of the DataView class.

[ VB ]
Public Sub New ( )

[ C# ]
public DataView ( );

[ C++ ]
public: DataView ( );

[ JScript ]
public function DataView ( );

Example

The following example initializes a new DataView.

// the code below  goes into the Declarations section of the form.
private void MakeDataView ( ) {
   DataView dv = new DataView ( );
   
   dv.Table = ds.Tables [ "Suppliers" ];
   dv.AllowDelete = true;
   dv.AllowEdit = true;
   dv.AllowNew = true;
   dv.RowFilter = "City = 'Berlin'";
   dv.RowStateFilter = DataViewRowState.ModifiedCurrent;
   dv.Sort = "CompanyName DESC";
   
   // simple bind to a TextBox control
   Text1.DataBindings.Add ( "Text", dv, "CompanyName" );
}
  C# VB

See Also

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