DataView DataView DataView DataView Constructors

정의

오버로드

DataView() DataView() DataView()

DataView 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DataView class.

DataView(DataTable) DataView(DataTable) DataView(DataTable) DataView(DataTable)

지정된 DataView를 사용하여 DataTable 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DataView class with the specified DataTable.

DataView(DataTable, String, String, DataViewRowState) DataView(DataTable, String, String, DataViewRowState) DataView(DataTable, String, String, DataViewRowState) DataView(DataTable, String, String, DataViewRowState)

지정된 DataView, DataTable, RowFilterSort를 사용하여 DataViewRowState 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DataView class with the specified DataTable, RowFilter, Sort, and DataViewRowState.

DataView() DataView() DataView()

DataView 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DataView class.

public:
 DataView();
public DataView ();
Public Sub New ()

예제

다음 예제에서는 새 DataView합니다.The following example creates a new DataView.

private void MakeDataView()
{
    DataView view = new DataView();

    view.Table = DataSet1.Tables["Suppliers"];
    view.AllowDelete = true;
    view.AllowEdit = true;
    view.AllowNew = true;
    view.RowFilter = "City = 'Berlin'";
    view.RowStateFilter = DataViewRowState.ModifiedCurrent;
    view.Sort = "CompanyName DESC";

    // Simple-bind to a TextBox control
    Text1.DataBindings.Add("Text", view, "CompanyName");
}
Private Sub MakeDataView()
    Dim view As DataView = New DataView

    view.Table = DataSet1.Tables("Suppliers")
    view.AllowDelete = True
    view.AllowEdit = True
    view.AllowNew = True
    view.RowFilter = "City = 'Berlin'"
    view.RowStateFilter = DataViewRowState.ModifiedCurrent
    view.Sort = "CompanyName DESC"
    
    ' Simple-bind to a TextBox control
    Text1.DataBindings.Add("Text", view, "CompanyName")
End Sub
추가 정보

DataView(DataTable) DataView(DataTable) DataView(DataTable) DataView(DataTable)

지정된 DataView를 사용하여 DataTable 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DataView class with the specified DataTable.

public:
 DataView(System::Data::DataTable ^ table);
public DataView (System.Data.DataTable table);
new System.Data.DataView : System.Data.DataTable -> System.Data.DataView
Public Sub New (table As DataTable)

매개 변수

table
DataTable DataTable DataTable DataTable

DataTable에 추가할 DataView입니다.A DataTable to add to the DataView.

예제

다음 예제에서는 새 DataView 지정 된 DataTable합니다.The following example creates a new DataView with the specified DataTable.

private void MakeDataView()
{
    DataView view = new DataView(DataSet1.Tables["Suppliers"]);

    // Bind a ComboBox control to the DataView.
    Combo1.DataSource = view;
    Combo1.DisplayMember = "Suppliers.CompanyName";
}
Private Sub MakeDataView()
    Dim view As DataView
    view = New DataView(DataSet1.Tables("Suppliers"))

    ' Bind a ComboBox control to the DataView.
    Combo1.DataSource = view
    Combo1.DisplayMember = "Suppliers.CompanyName"
End Sub
추가 정보

DataView(DataTable, String, String, DataViewRowState) DataView(DataTable, String, String, DataViewRowState) DataView(DataTable, String, String, DataViewRowState) DataView(DataTable, String, String, DataViewRowState)

지정된 DataView, DataTable, RowFilterSort를 사용하여 DataViewRowState 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DataView class with the specified DataTable, RowFilter, Sort, and DataViewRowState.

public:
 DataView(System::Data::DataTable ^ table, System::String ^ RowFilter, System::String ^ Sort, System::Data::DataViewRowState RowState);
public DataView (System.Data.DataTable table, string RowFilter, string Sort, System.Data.DataViewRowState RowState);
new System.Data.DataView : System.Data.DataTable * string * string * System.Data.DataViewRowState -> System.Data.DataView
Public Sub New (table As DataTable, RowFilter As String, Sort As String, RowState As DataViewRowState)

매개 변수

table
DataTable DataTable DataTable DataTable

DataTable에 추가할 DataView입니다.A DataTable to add to the DataView.

RowFilter
String String String String

RowFilter에 적용할 DataView입니다.A RowFilter to apply to the DataView.

Sort
String String String String

Sort에 적용할 DataView입니다.A Sort to apply to the DataView.

예제

다음 예제에서는 새 DataView 지정 된 DataTable합니다.The following example creates a new DataView with the specified DataTable.

private void MakeDataView(DataSet dataSet)
{
    DataView view = new DataView(dataSet.Tables["Suppliers"], 
        "Country = 'UK'", "CompanyName", 
        DataViewRowState.CurrentRows);
    view.AllowEdit = true;
    view.AllowNew = true;
    view.AllowDelete = true;
}
Private Sub MakeDataView(ByVal dataSet As DataSet)
    Dim view As New DataView(dataSet.Tables("Suppliers"), _
        "Country = 'UK'", "CompanyName", _
        DataViewRowState.CurrentRows)
    view.AllowEdit = True
    view.AllowNew = True
    view.AllowDelete = True
End Sub
추가 정보

적용 대상