共用方式為


BindingSource 元件

更新:2007 年 11 月

封裝資料來源以繫結至控制項。

BindingSource 元件有兩個用途。第一,它會在表單上的控制項繫結至資料時,提供間接取值 (Indirection) 層。這項作業的完成,是透過將 BindingSource 元件繫結至資料來源,然後將表單上的控制項繫結至 BindingSource 元件。所有與資料的進一步互動 (包括巡覽、排序、篩選和更新) 都會透過呼叫 BindingSource 元件來完成。

第二,BindingSource 元件可以當做強型別 (Strongly Typed) 的資料來源。使用 Add 方法將某個型別加入 BindingSource 元件,會建立該型別的清單。

在本節中

參考

相關章節