DataView DataView DataView DataView Class

定義

代表用於排序、篩選、搜尋、編輯和巡覽的 DataTable 可資料繫結的自訂檢視。Represents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation. DataView 不儲存資料,卻代表其對應之 DataTable 的連線檢視。The DataView does not store data, but instead represents a connected view of its corresponding DataTable. DataView 的資料變更會影響 DataTableChanges to the DataView's data will affect the DataTable. DataTable 的資料變更會影響所有與它建立關聯的 DataViewChanges to the DataTable's data will affect all DataViews associated with it.

public ref class DataView : System::ComponentModel::MarshalByValueComponent, System::Collections::IList, System::ComponentModel::IBindingListView, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList
public class DataView : System.ComponentModel.MarshalByValueComponent, System.Collections.IList, System.ComponentModel.IBindingListView, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList
type DataView = class
    inherit MarshalByValueComponent
    interface IBindingListView
    interface ITypedList
    interface ISupportInitializeNotification
    interface IBindingList
    interface IList
    interface ICollection
    interface IEnumerable
    interface ISupportInitialize
Public Class DataView
Inherits MarshalByValueComponent
Implements IBindingListView, IList, ISupportInitializeNotification, ITypedList
繼承
實作

範例

下列範例會建立一個具有DataTable一個資料行和五個數據列的單一。The following example creates a single DataTable with one column and five rows. 系統DataView會建立兩個物件RowStateFilter , 並在每個物件上設定, 以顯示資料表資料的不同視圖。Two DataView objects are created and the RowStateFilter is set on each to show different views of the table data. 然後會列印這些值。The values are then printed.

using System;
using System.Xml;
using System.Data;
using System.Data.Common;
using System.Windows.Forms;

public class Form1: Form
{
    protected DataSet DataSet1;
    protected DataGrid dataGrid1;



    private void DemonstrateDataView()
    {
        // Create one DataTable with one column.
        DataTable table = new DataTable("table");
        DataColumn colItem = new DataColumn("item",
            Type.GetType("System.String"));
        table.Columns.Add(colItem);

        // Add five items.
        DataRow NewRow;
        for(int i = 0; i <5; i++)
        {
            NewRow = table.NewRow();
            NewRow["item"] = "Item " + i;
            table.Rows.Add(NewRow);
        }
        // Change the values in the table.
        table.AcceptChanges();
        table.Rows[0]["item"]="cat";
        table.Rows[1]["item"] = "dog";
 
        // Create two DataView objects with the same table.
        DataView firstView = new DataView(table);
        DataView secondView = new DataView(table);
 
        // Print current table values.
        PrintTableOrView(table,"Current Values in Table");
    
        // Set first DataView to show only modified 
        // versions of original rows.
        firstView.RowStateFilter=DataViewRowState.ModifiedOriginal;

        // Print values.   
        PrintTableOrView(firstView,"First DataView: ModifiedOriginal");

        // Add one New row to the second view.
        DataRowView rowView;
        rowView=secondView.AddNew();
        rowView["item"] = "fish";

        // Set second DataView to show modified versions of 
        // current rows, or New rows.
        secondView.RowStateFilter=DataViewRowState.ModifiedCurrent 
            | DataViewRowState.Added;
        // Print modified and Added rows.
        PrintTableOrView(secondView, 
            "Second DataView: ModifiedCurrent | Added");
    }
 
    private void PrintTableOrView(DataTable table, string label)
    {
        // This function prints values in the table or DataView.
        Console.WriteLine("\n" + label);
        for(int i = 0; i<table.Rows.Count;i++)
        {
            Console.WriteLine("\table" + table.Rows[i]["item"]);
        }
        Console.WriteLine();
    }
 
    private void PrintTableOrView(DataView view, string label)
    {
 
        // This overload prints values in the table or DataView.
        Console.WriteLine("\n" + label);
        for(int i = 0; i<view.Count;i++)
        {
            Console.WriteLine("\table" + view[i]["item"]);
        }
        Console.WriteLine();
    }
}
Private Sub DemonstrateDataView()
    ' Create one DataTable with one column.
    Dim table As New DataTable("table")
    Dim colItem As New DataColumn("item", _
        Type.GetType("System.String"))
    table.Columns.Add(colItem)

    ' Add five items.
    Dim NewRow As DataRow
    Dim i As Integer
    For i = 0 To 4
    
    NewRow = table.NewRow()
    NewRow("item") = "Item " & i
    table.Rows.Add(NewRow)
    Next
    table.AcceptChanges()

    ' Create two DataView objects with the same table.
    Dim firstView As New DataView(table)
    Dim secondView As New DataView(table)
    
    ' Change the values in the table.
    table.Rows(0)("item") = "cat"
    table.Rows(1)("item") = "dog"
    
    ' Print current table values.
    PrintTableOrView(table, "Current Values in Table")
        
    ' Set first DataView to show only modified versions of original rows.
    firstView.RowStateFilter = DataViewRowState.ModifiedOriginal

    ' Print values.    
    PrintTableOrView(firstView, "First DataView: ModifiedOriginal")

    ' Add one New row to the second view.
    Dim rowView As DataRowView
    rowView = secondView.AddNew()
    rowView("item") = "fish"
    ' Set second DataView to show modified versions of 
    ' current rows, or New rows.
    secondView.RowStateFilter = DataViewRowState.ModifiedCurrent _
        Or DataViewRowState.Added
    ' Print modified and Added rows.
    PrintTableOrView(secondView, _
        "Second DataView: ModifiedCurrent or Added")
End Sub
    
Overloads Private Sub PrintTableOrView( _
    ByVal view As DataView, ByVal label As String)
    Console.WriteLine(label)
    Dim i As Integer
    For i = 0 To view.count - 1
    
    Console.WriteLine(view(i)("item"))
    Next
    Console.WriteLine()
End Sub
    
Overloads Private Sub PrintTableOrView( _
    ByVal table As DataTable, ByVal label As String)
    Console.WriteLine(label)
    Dim i As Integer
    For i = 0 To table.Rows.Count - 1
    Console.WriteLine(table.Rows(i)("item"))
    Next
    Console.WriteLine()
End Sub

下列範例會建立DataView依 total by a LINQ to DataSetLINQ to DataSet查詢所排序的線上訂單:The following example creates a DataView of online orders ordered by total due from a LINQ to DataSetLINQ to DataSet query:

DataTable orders = dataSet.Tables["SalesOrderHeader"];

EnumerableRowCollection<DataRow> query =
    from order in orders.AsEnumerable()
    where order.Field<bool>("OnlineOrderFlag") == true
    orderby order.Field<decimal>("TotalDue")
    select order;

DataView view = query.AsDataView();

bindingSource1.DataSource = view;
Dim orders As DataTable = dataSet.Tables("SalesOrderHeader")

Dim query = _
    From order In orders.AsEnumerable() _
    Where order.Field(Of Boolean)("OnlineOrderFlag") = True _
    Order By order.Field(Of Decimal)("TotalDue") _
    Select order

Dim view As DataView = query.AsDataView()
bindingSource1.DataSource = view

備註

的主要功能DataView是允許 Windows Forms 和 Web 表單上的資料系結。A major function of the DataView is to allow for data binding on both Windows Forms and Web Forms.

此外, 您DataView可以自訂, 以呈現的資料DataTable子集。Additionally, a DataView can be customized to present a subset of data from the DataTable. 這項功能可讓您將兩個控制項系DataTable結至相同的, 但會顯示不同版本的資料。This capability lets you have two controls bound to the same DataTable, but that show different versions of the data. 例如, 一個控制項可能會系結至DataView , 其中會顯示資料表中的所有資料列, 而第二個可能會設定為只顯示已DataTable從刪除的資料列。For example, one control might be bound to a DataView that shows all the rows in the table, and a second might be configured to display only the rows that have been deleted from the DataTable. DataTableDefaultView有屬性。The DataTable also has a DefaultView property. 這會傳回資料表DataView的預設值。This returns the default DataView for the table. 例如, 如果您想要在資料表上建立自訂視圖, 請在所RowFilter傳回DefaultViewDataView上設定。For example, if you want to create a custom view on the table, set the RowFilter on the DataView returned by the DefaultView.

若要建立篩選和排序的資料檢視, 請設定RowFilterSort屬性。To create a filtered and sorted view of data, set the RowFilter and Sort properties. 然後, 使用Item[Int32]屬性來傳回單一DataRowViewThen, use the Item[Int32] property to return a single DataRowView.

您也可以使用AddNewDelete方法, 在一組資料列中加入和刪除。You can also add and delete from the set of rows using the AddNew and Delete methods. 當您使用這些方法時, RowStateFilter屬性可以設定為指定只顯示已刪除的資料列或新的DataView資料列。When you use those methods, the RowStateFilter property can set to specify that only deleted rows or new rows be displayed by the DataView.

注意

如果您未明確指定的DataView排序準則, 中DataViewDataRowView物件會根據DataTable.RowsDataRowCollection對應DataRow的 DataView 索引來排序。If you do not explicitly specify sort criteria for DataView, the DataRowView objects in DataView are sorted based on the index of DataView's corresponding DataRow in the DataTable.Rows DataRowCollection.

LINQ to DataSetLINQ to DataSet可讓開發人員使用DataSet LINQLINQ來建立複雜且功能強大的查詢。allows developers to create complex, powerful queries over a DataSet by using LINQLINQ. DataRow不過, LINQ to DataSetLINQ to DataSet查詢會傳回物件的列舉, 但不容易在系結案例中使用。A LINQ to DataSetLINQ to DataSet query returns an enumeration of DataRow objects, however, which is not easily used in a binding scenario. DataView可以從LINQ to DataSetLINQ to DataSet查詢中建立, 並採用該查詢的篩選和排序特性。DataView can be created from a LINQ to DataSetLINQ to DataSet query and takes on the filtering and sorting characteristics of that query. LINQ to DataSetLINQ to DataSetDataView由提供LINQLINQ以運算式為基礎的篩選和排序, 來擴充的功能, 讓篩選和排序作業比以字串為基礎的篩選和排序更複雜且功能強大。extends the functionality of the DataView by providing LINQLINQ expression-based filtering and sorting, which allows for much more complex and powerful filtering and sorting operations than string-based filtering and sorting. 如需詳細資訊, 請參閱資料系結和 LINQ to DataSetSee Data Binding and LINQ to DataSet for more information.

建構函式

DataView() 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)

使用指定的 DataTableRowFilterSortDataViewRowState,初始化 DataView 類別的新執行個體。Initializes a new instance of the DataView class with the specified DataTable, RowFilter, Sort, and DataViewRowState.

屬性

AllowDelete AllowDelete AllowDelete AllowDelete

設定或取得值,表示是否允許刪除。Sets or gets a value that indicates whether deletes are allowed.

AllowEdit AllowEdit AllowEdit AllowEdit

取得或設定值,指出是否允許編輯。Gets or sets a value that indicates whether edits are allowed.

AllowNew AllowNew AllowNew AllowNew

取得或設定值,指出是否可以使用 AddNew() 方法加入新的資料列。Gets or sets a value that indicates whether the new rows can be added by using the AddNew() method.

ApplyDefaultSort ApplyDefaultSort ApplyDefaultSort ApplyDefaultSort

取得或設定值,指出是否要使用預設排序。Gets or sets a value that indicates whether to use the default sort. 預設排序是依 PrimaryKey 指定的所有主要金鑰遞增排序。The default sort is (ascending) by all primary keys as specified by PrimaryKey.

Container Container Container Container

取得元件的容器。Gets the container for the component.

(Inherited from MarshalByValueComponent)
Count Count Count Count

取得套用 RowFilterRowStateFilter 之後,DataView 中的記錄數目。Gets the number of records in the DataView after RowFilter and RowStateFilter have been applied.

DataViewManager DataViewManager DataViewManager DataViewManager

取得與這份檢視相關聯的 DataViewManagerGets the DataViewManager associated with this view.

DesignMode DesignMode DesignMode DesignMode

取得值,表示元件目前是否處於設計模式。Gets a value indicating whether the component is currently in design mode.

(Inherited from MarshalByValueComponent)
Events Events Events Events

取得附加在這個元件上的事件處理常式清單。Gets the list of event handlers that are attached to this component.

(Inherited from MarshalByValueComponent)
IsInitialized IsInitialized IsInitialized IsInitialized

取得值,表示元件是否已初始化。Gets a value that indicates whether the component is initialized.

IsOpen IsOpen IsOpen IsOpen

取得值,指出資料來源目前是否開放且在 DataTable 上投影出資料檢視。Gets a value that indicates whether the data source is currently open and projecting views of data on the DataTable.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

從指定的資料表取得一列資料。Gets a row of data from a specified table.

RowFilter RowFilter RowFilter RowFilter

取得或設定用來篩選在 DataView 中檢視之資料列的運算式。Gets or sets the expression used to filter which rows are viewed in the DataView.

RowStateFilter RowStateFilter RowStateFilter RowStateFilter

取得或設定在 DataView 使用的資料列狀態篩選。Gets or sets the row state filter used in the DataView.

Site Site Site Site

取得或設定元件的站台。Gets or sets the site of the component.

(Inherited from MarshalByValueComponent)
Sort Sort Sort Sort

取得或設定排序資料行或資料行,並排序 DataView 的次序。Gets or sets the sort column or columns, and sort order for the DataView.

Table Table Table Table

取得或設定來源 DataTableGets or sets the source DataTable.

方法

AddNew() AddNew() AddNew() AddNew()

將新資料列加入 DataViewAdds a new row to the DataView.

BeginInit() BeginInit() BeginInit() BeginInit()

開始對表單或另一個元件所使用的 DataView 進行初始化作業。Starts the initialization of a DataView that is used on a form or used by another component. 初始化會於執行階段時執行。The initialization occurs at runtime.

Close() Close() Close() Close()

關閉 DataViewCloses the DataView.

ColumnCollectionChanged(Object, CollectionChangeEventArgs) ColumnCollectionChanged(Object, CollectionChangeEventArgs) ColumnCollectionChanged(Object, CollectionChangeEventArgs) ColumnCollectionChanged(Object, CollectionChangeEventArgs)

成功變更 DataColumnCollection 後發生。Occurs after a DataColumnCollection has been changed successfully.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

將項目複製到陣列。Copies items into an array. 僅適用於 Web Form 介面。Only for Web Forms Interfaces.

Delete(Int32) Delete(Int32) Delete(Int32) Delete(Int32)

刪除指定索引處的資料列。Deletes a row at the specified index.

Dispose() Dispose() Dispose() Dispose()

釋放 MarshalByValueComponent 所使用的所有資源。Releases all resources used by the MarshalByValueComponent.

(Inherited from MarshalByValueComponent)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

處置 DataView 物件所使用的資源 (除了記憶體之外)。Disposes of the resources (other than memory) used by the DataView object.

EndInit() EndInit() EndInit() EndInit()

結束對表單或另一個元件所使用的 DataView 進行初始化作業。Ends the initialization of a DataView that is used on a form or used by another component. 初始化會於執行階段時執行。The initialization occurs at runtime.

Equals(DataView) Equals(DataView) Equals(DataView) Equals(DataView)

判斷指定的 DataView 執行個體是否視為相等。Determines whether the specified DataView instances are considered equal.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Find(Object) Find(Object) Find(Object) Find(Object)

依據指定的排序索引鍵值,找出 DataView 中的資料列。Finds a row in the DataView by the specified sort key value.

Find(Object[]) Find(Object[]) Find(Object[]) Find(Object[])

依據指定的排序索引鍵值,找出 DataView 中的資料列。Finds a row in the DataView by the specified sort key values.

FindRows(Object) FindRows(Object) FindRows(Object) FindRows(Object)

傳回 DataRowView 物件的陣列,其資料行符合指定的排序鍵值。Returns an array of DataRowView objects whose columns match the specified sort key value.

FindRows(Object[]) FindRows(Object[]) FindRows(Object[]) FindRows(Object[])

傳回 DataRowView 物件的陣列,其資料行符合指定的排序鍵值。Returns an array of DataRowView objects whose columns match the specified sort key value.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

取得這個 DataView 的列舉值。Gets an enumerator for this DataView.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

取得 IServiceProvider 的實作器。Gets the implementer of the IServiceProvider.

(Inherited from MarshalByValueComponent)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
IndexListChanged(Object, ListChangedEventArgs) IndexListChanged(Object, ListChangedEventArgs) IndexListChanged(Object, ListChangedEventArgs) IndexListChanged(Object, ListChangedEventArgs)

成功變更 DataView 後發生。Occurs after a DataView has been changed successfully.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnListChanged(ListChangedEventArgs) OnListChanged(ListChangedEventArgs) OnListChanged(ListChangedEventArgs) OnListChanged(ListChangedEventArgs)

引發 ListChanged 事件。Raises the ListChanged event.

Open() Open() Open() Open()

開啟 DataViewOpens a DataView.

Reset() Reset() Reset() Reset()

已保留供內部使用。Reserved for internal use only.

ToString() ToString() ToString() ToString()

傳回任何包含 Component 名稱的 StringReturns a String containing the name of the Component, if any. 不應覆寫此方法。This method should not be overridden.

(Inherited from MarshalByValueComponent)
ToTable() ToTable() ToTable() ToTable()

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

ToTable(Boolean, String[]) ToTable(Boolean, String[]) ToTable(Boolean, String[]) ToTable(Boolean, String[])

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

ToTable(String) ToTable(String) ToTable(String) ToTable(String)

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

ToTable(String, Boolean, String[]) ToTable(String, Boolean, String[]) ToTable(String, Boolean, String[]) ToTable(String, Boolean, String[])

根據現有 DataView 中的資料列,建立並傳回新的 DataTableCreates and returns a new DataTable based on rows in an existing DataView.

UpdateIndex() UpdateIndex() UpdateIndex() UpdateIndex()

已保留供內部使用。Reserved for internal use only.

UpdateIndex(Boolean) UpdateIndex(Boolean) UpdateIndex(Boolean) UpdateIndex(Boolean)

已保留供內部使用。Reserved for internal use only.

事件

Disposed Disposed Disposed Disposed

加入事件處理常式來接聽 (Listen) 元件上的 Disposed 事件。Adds an event handler to listen to the Disposed event on the component.

(Inherited from MarshalByValueComponent)
Initialized Initialized Initialized Initialized

發生於 DataView 的初始化完成時。Occurs when initialization of the DataView is completed.

ListChanged ListChanged ListChanged ListChanged

發生於清單受 DataView 變更管理時。Occurs when the list managed by the DataView changes.

明確介面實作

IBindingList.AddIndex(PropertyDescriptor) IBindingList.AddIndex(PropertyDescriptor) IBindingList.AddIndex(PropertyDescriptor) IBindingList.AddIndex(PropertyDescriptor)

如需這個成員的說明,請參閱 AddIndex(PropertyDescriptor)For a description of this member, see AddIndex(PropertyDescriptor).

IBindingList.AddNew() IBindingList.AddNew() IBindingList.AddNew() IBindingList.AddNew()

如需這個成員的說明,請參閱 AddNew()For a description of this member, see AddNew().

IBindingList.AllowEdit IBindingList.AllowEdit IBindingList.AllowEdit IBindingList.AllowEdit

如需這個成員的說明,請參閱 AllowEditFor a description of this member, see AllowEdit.

IBindingList.AllowNew IBindingList.AllowNew IBindingList.AllowNew IBindingList.AllowNew

如需這個成員的說明,請參閱 AllowNewFor a description of this member, see AllowNew.

IBindingList.AllowRemove IBindingList.AllowRemove IBindingList.AllowRemove IBindingList.AllowRemove

如需這個成員的說明,請參閱 AllowRemoveFor a description of this member, see AllowRemove.

IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) IBindingList.ApplySort(PropertyDescriptor, ListSortDirection)

如需這個成員的說明,請參閱 ApplySort(PropertyDescriptor, ListSortDirection)For a description of this member, see ApplySort(PropertyDescriptor, ListSortDirection).

IBindingList.Find(PropertyDescriptor, Object) IBindingList.Find(PropertyDescriptor, Object) IBindingList.Find(PropertyDescriptor, Object) IBindingList.Find(PropertyDescriptor, Object)

如需這個成員的說明,請參閱 Find(PropertyDescriptor, Object)For a description of this member, see Find(PropertyDescriptor, Object).

IBindingList.IsSorted IBindingList.IsSorted IBindingList.IsSorted IBindingList.IsSorted

如需這個成員的說明,請參閱 IsSortedFor a description of this member, see IsSorted.

IBindingList.RemoveIndex(PropertyDescriptor) IBindingList.RemoveIndex(PropertyDescriptor) IBindingList.RemoveIndex(PropertyDescriptor) IBindingList.RemoveIndex(PropertyDescriptor)

如需這個成員的說明,請參閱 RemoveIndex(PropertyDescriptor)For a description of this member, see RemoveIndex(PropertyDescriptor).

IBindingList.RemoveSort() IBindingList.RemoveSort() IBindingList.RemoveSort() IBindingList.RemoveSort()

如需這個成員的說明,請參閱 RemoveSort()For a description of this member, see RemoveSort().

IBindingList.SortDirection IBindingList.SortDirection IBindingList.SortDirection IBindingList.SortDirection

如需這個成員的說明,請參閱 SortDirectionFor a description of this member, see SortDirection.

IBindingList.SortProperty IBindingList.SortProperty IBindingList.SortProperty IBindingList.SortProperty

如需這個成員的說明,請參閱 SortPropertyFor a description of this member, see SortProperty.

IBindingList.SupportsChangeNotification IBindingList.SupportsChangeNotification IBindingList.SupportsChangeNotification IBindingList.SupportsChangeNotification

如需這個成員的說明,請參閱 SupportsChangeNotificationFor a description of this member, see SupportsChangeNotification.

IBindingList.SupportsSearching IBindingList.SupportsSearching IBindingList.SupportsSearching IBindingList.SupportsSearching

如需這個成員的說明,請參閱 SupportsSearchingFor a description of this member, see SupportsSearching.

IBindingList.SupportsSorting IBindingList.SupportsSorting IBindingList.SupportsSorting IBindingList.SupportsSorting

如需這個成員的說明,請參閱 SupportsSortingFor a description of this member, see SupportsSorting.

IBindingListView.ApplySort(ListSortDescriptionCollection) IBindingListView.ApplySort(ListSortDescriptionCollection) IBindingListView.ApplySort(ListSortDescriptionCollection) IBindingListView.ApplySort(ListSortDescriptionCollection)

如需這個成員的說明,請參閱 ApplySort(ListSortDescriptionCollection)For a description of this member, see ApplySort(ListSortDescriptionCollection).

IBindingListView.Filter IBindingListView.Filter IBindingListView.Filter IBindingListView.Filter

如需這個成員的說明,請參閱 FilterFor a description of this member, see Filter.

IBindingListView.RemoveFilter() IBindingListView.RemoveFilter() IBindingListView.RemoveFilter() IBindingListView.RemoveFilter()

如需這個成員的說明,請參閱 RemoveFilter()For a description of this member, see RemoveFilter().

IBindingListView.SortDescriptions IBindingListView.SortDescriptions IBindingListView.SortDescriptions IBindingListView.SortDescriptions

如需這個成員的說明,請參閱 SortDescriptionsFor a description of this member, see SortDescriptions.

IBindingListView.SupportsAdvancedSorting IBindingListView.SupportsAdvancedSorting IBindingListView.SupportsAdvancedSorting IBindingListView.SupportsAdvancedSorting

如需這個成員的說明,請參閱 SupportsAdvancedSortingFor a description of this member, see SupportsAdvancedSorting.

IBindingListView.SupportsFiltering IBindingListView.SupportsFiltering IBindingListView.SupportsFiltering IBindingListView.SupportsFiltering

如需這個成員的說明,請參閱 SupportsFilteringFor a description of this member, see SupportsFiltering.

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

如需這個成員的說明,請參閱 IsSynchronizedFor a description of this member, see IsSynchronized.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

如需這個成員的說明,請參閱 SyncRootFor a description of this member, see SyncRoot.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

如需這個成員的說明,請參閱 Add(Object)For a description of this member, see Add(Object).

IList.Clear() IList.Clear() IList.Clear() IList.Clear()

如需這個成員的說明,請參閱 Clear()For a description of this member, see Clear().

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

如需這個成員的說明,請參閱 Contains(Object)For a description of this member, see Contains(Object).

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

如需這個成員的說明,請參閱 IndexOf(Object)For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

如需這個成員的說明,請參閱 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

如需這個成員的說明,請參閱 IsFixedSizeFor a description of this member, see IsFixedSize.

IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

如需這個成員的說明,請參閱 IsReadOnlyFor a description of this member, see IsReadOnly.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

如需這個成員的說明,請參閱 Item[Int32]For a description of this member, see Item[Int32].

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

如需這個成員的說明,請參閱 Remove(Object)For a description of this member, see Remove(Object).

IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32)

如需這個成員的說明,請參閱 RemoveAt(Int32)For a description of this member, see RemoveAt(Int32).

ITypedList.GetItemProperties(PropertyDescriptor[]) ITypedList.GetItemProperties(PropertyDescriptor[]) ITypedList.GetItemProperties(PropertyDescriptor[]) ITypedList.GetItemProperties(PropertyDescriptor[])

如需這個成員的說明,請參閱 GetItemProperties(PropertyDescriptor[])For a description of this member, see GetItemProperties(PropertyDescriptor[]).

ITypedList.GetListName(PropertyDescriptor[]) ITypedList.GetListName(PropertyDescriptor[]) ITypedList.GetListName(PropertyDescriptor[]) ITypedList.GetListName(PropertyDescriptor[])

如需這個成員的說明,請參閱 GetListName(PropertyDescriptor[])For a description of this member, see GetListName(PropertyDescriptor[]).

擴充方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於

執行緒安全性

這種類型對於多執行緒讀取作業而言是安全的。This type is safe for multithreaded read operations. 您必須同步處理任何寫入作業。You must synchronize any write operations.

另請參閱