DataBinding

Objectives of the DataBinding is list and explain the types of binding; explain Binding Context and CurrencyManager class; list and explain the properties and methods of Binding Source class; Explain briefly the Sort property of the BindingSource class. | DataBinding Objectives List and explain the types of binding. Explain Binding Context and CurrencyManager class. List and explain the properties and methods of Binding Source class. Explain briefly the Sort property of the BindingSource class DataBinding DataBinding is one of the most powerful features of .NET and Windows Forms. It help in linking a control to a data source tables in the database. This is useful to view, insert, update, and delete records in the table. DataBinding Allows you to create a link between the controls of the form and the database Once the controls are linked to the database , you can retrieve data from the database. Data binding Data Provider Data Source Consumer Database BindingContext class BindingContext class is used to handle the BindingManagerBase objects. Windows Form contains at leats one BindingContext Object Properties IsReadOnly Item Methods Add Contains Remove UpdateBinding ("Text" , ["Employee"] , "EmpNo") . | DataBinding Objectives List and explain the types of binding. Explain Binding Context and CurrencyManager class. List and explain the properties and methods of Binding Source class. Explain briefly the Sort property of the BindingSource class DataBinding DataBinding is one of the most powerful features of .NET and Windows Forms. It help in linking a control to a data source tables in the database. This is useful to view, insert, update, and delete records in the table. DataBinding Allows you to create a link between the controls of the form and the database Once the controls are linked to the database , you can retrieve data from the database. Data binding Data Provider Data Source Consumer Database BindingContext class BindingContext class is used to handle the BindingManagerBase objects. Windows Form contains at leats one BindingContext Object Properties IsReadOnly Item Methods Add Contains Remove UpdateBinding ("Text" , ["Employee"] , "EmpNo") CurrencyManager class A control which is bound to a data source is associated with a CurrencyManager. Property Methods Events Binding CheckEmpty Count OnPositionChanged Current OnItemChanged ItemChanged List AddNew PositionChanged Position Refresh ListChanged RemoveAt ResumeBinding CurrencyManager bmOrders = (CurrencyManager)[["Employee"]]; ; Types of Binding Simple Binding : a property of a control is bound to a single value Ex : TextBox with a column in table Complex Binding : a control is associated with one or more data values Can only be done on controls, which display more than one value at a time Ex : comboBox Simple Data binding Complex data binding Binding class Properties Methods Events BindAbleComponent ReadValue BindingComplete BindingManagerBase WriteValue Control Datasource BindingSource component Acts as a strongly typed data source Binding the controls and data indirectly Support data navigation , manipulation and sorting or filtering data BindingSource Binding a control You can bind a control to a data source at desing time or run time. Sort property of BindingSource Filter property - Filter property of the BindingSource class is used for filtering data Ex : = “Address=‘California’” Summary Summary

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
12    26    1    01-12-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.