NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataView Constructor ()

Initializes a new instance of the DataView class.

[Visual Basic]
Overloads Public Sub New()
[C#]
public DataView();
[C++]
public: DataView();
[JScript]
public function DataView();

Example

The following example creates a new DataView.

' The code below  goes into the Declarations section of the form.
[VB]
Private Sub MakeDataView()
   Dim dv As DataView
   dv = New DataView
   With dv
      .Table = DataSet1.Tables("Suppliers")
      .AllowDelete = True
      .AllowEdit = True
      .AllowNew = True
      .RowFilter = "City = 'Berlin'"
      .RowStateFilter = DataViewRowState.ModifiedCurrent
      .Sort = "CompanyName DESC"
   End With
   
   ' Simple bind to a TextBox control
   Text1.Bindings.Add("Text", dv, "CompanyName")
End Sub

See Also

DataView Class | DataView Members | System.Data Namespace | DataView Constructor Overload List | DataTable | DataSetView