Sabtu, 09 November 2013

Binding Data with BindingNavigator in Windows Forms

There are some steps to bind the data with DataSet object. Theses steps are
Step-1: Create a Windows Form.
Step-2 : Add Binding Navigator and control (Three Label control and Three TextBox control) on the form
Controls and binding navigator on the windows form
Step-3: Right Click on First TextBox and select properties .
Step-4: Select "Add project data source " link  in Text property of (DataBindings) tab.
"Add project data source " link  in Text property of (DataBindings) tab

Step-5: Now open Data Source configuration wizard.
Step-6: Select Database in configuration wizard and click next button.
Select Database in configuration wizard

Step-7 : Select DataSet in Database model and click next.
Select DataSet in Database model

Step-8:  Choose your Data Connection and create connection string.
Data Connection and create connection string.
Step-9: Choose Database object which you want like Table,View etc.
 Database object which you want like Table,View
Step-10: Click to Finish Button.
Step-11: In connected data source select single field or column which you want to connect with first TextBox.
DataBinding in windows form

Step-12: Similarly bind city and country with remaining TextBox control.
Step-13: Set BindingSource property of the BindingNavigator is given DataSet.
Step-14: Run your application.
Binding Data with BindingNavigator in Windows Forms

Binding Data with BindingNavigator in Windows Forms

Tidak ada komentar:

Posting Komentar