Data Binding

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

Data Binding

Rating:

In the context of Visual Studio .NET, a user can create any Windows-based applications along with the user interface by using Windows Forms. As forms are the base unit of an application, the functionality of the application can be enhanced by using a rich set of controls that provide the user interface along with writing interactive code to manipulate data. Data Binding can display as well as make changes to the information received from a data source in a form.

Therefore, data binding is a technique that connects a link between the user interface controls of a Windows Form and the data that is retrieved from a data source. A user can thus bind data to ADO.NET DataSet controls, Array controls, ArrayList controls, etc. by implementing the IList interface, can read from as well as write and save data to a file, or can derive data from the values of other controls. The user can also bind any property of any control to a dataset table of the data source on the form. In Windows Forms, there can be several types of data binding that are as follows:

  • Simple Data Binding: Simple data binding is the ability to bind or connect a single data value from a data model of a data source to a single property or element of a control. This type of data binding is suitable for controls such as TextBox control, Label control, etc. that display only a single value. Similarly, a property of such controls can be bound to a single required field in a database.


  • Complex Data Binding: In contrast to the simple data binding, complex data binding is the ability to bind or connect a list of data elements from the data source to more than one property or element of a control. Controls that support the complex data binding include DataGrid control, ListBox control, ComboBox control, and so on that can display more than one data value.


  • One-way and Two-way Data Binding: One-way data binding is one type of data binding that can be described as a process where a property of a control is bound to the data model in read-only manner. When set up in such a fashion, changes made to data values in the data model will reflect the bound property of a control, but direct changes to the bound property of the control will not be reflected in the data model.


  • Data Binding using the DataForm Wizard: Visual Studio .NET also provides a built-in feature called as the DataForm Wizard for the binding of data. The Data Form Wizard is meant to develop database applications in a very easiest and fastest manner, without designing the form by placing required controls on the form, and without writing a single line of code, as this wizard generates code automatically. The wizard can be added in your project by selecting the Project > Add New Item > DataForm Wizard from the main menu in the .NET application project. The DataForm Wizard is beneficial for beginners and when a user has to create simple Windows-based database applications. However, its major drawback is that it provides users with limited functionality.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.