简体   繁体   中英

C#: data-binding objects such as DataGrid

C#: if you bind a DataGrid object to a List object and set the columns to show properties of List's objects, will the DataGrid update when the data-object does?

Is it advisable to data-bind DataGrids? Isn't it better for the programmer to control this process themselves?

No, DataGrid will not update when the data-object does. If you want such behavior you need to implement IBindingList or use BindingList class (or DataTable).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM