Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Databinding in C# and .NET

I am pretty new to C# and .NET and I'm strugling a little with the whole concept of databinding. What I am asking for is a quick rundown of the concept, or even better, point me towards sources on the net (preferred) or in print that can help me get my head around the idea.

EDIT:

I do my development in vs2008 and we are using winforms

like image 443
Sakkle Avatar asked Jan 16 '09 13:01

Sakkle


People also ask

What is meant by DataBinding?

Data binding is the process that couples two data sources together and synchronizes them. With data binding, a change to an element in a data set automatically updates in the bound data set.

What is DataBinding and its types in C#?

You also learned that there are two types of data binding as in the following: Simple Data binding: the process of binding a control such as a TextBox or a label. Complex data binding: the process of binding a control such as ComboBox, DataGridView, or ListBox.

Why is data binding needed?

The Data Binding Library automatically generates the classes required to bind the views in the layout with your data objects. The library provides features such as imports, variables, and includes that you can use in your layouts. The Data Binding Library provides classes and methods to easily observe data for changes.


1 Answers

The concept of databinding is quite simple; It allows you to 'bind' the data that is contained in an object to a visual control. That control 'displays' your data. When the user changes the value that is displayed by the control, the changes are automatically persisted to the underlying object. Vice versa, when someone changes the data in the object, the control can display the newest value.

http://msdn.microsoft.com/en-us/library/ms752347.aspx http://www.akadia.com/services/dotnet_databinding.html

like image 140
Frederik Gheysels Avatar answered Oct 03 '22 23:10

Frederik Gheysels