Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does data binding work on invisible control?

Tags:

c#

.net

winforms

This is a .net problem with winforms, not asp.net.

I have a windows form with several tabs. I set data bindings of all controls when the form is loaded. But I have noticed that the data bindings of controls on the second tab do not work. Those bindings work only when the form is loaded and when I select the second tab. This brings the suspicion to me: data bindings work only when bound controls become visible.

Anyone can tell me whether this is true or not? It is not hard to test this but I would like to know some confirmation.

Thanks

like image 817
Steve Avatar asked Jun 03 '09 07:06

Steve


People also ask

What is an example of simple data binding control?

Simple data binding is the type of binding typical for controls such as a TextBox control or Label control, which are controls that typically only display a single value. In fact, any property on a control can be bound to a field in a database.

What is the purpose of data binding?

Data binding is the process that establishes a connection between the app UI and the data it displays. If the binding has the correct settings and the data provides the proper notifications, when the data changes its value, the elements that are bound to the data reflect changes automatically.

How does data binding work in asp net?

The term 'data binding in ASP.NET simply means that the data that is collected from a source is bound to the controls that provide the read and write connection to the data. Databases, XML files, flat files, etc are some of the data sources we are talking about here. In ASP.NET 1.


1 Answers

You are correct. A data-bound control are not updated until the control is made visible.

The only reference I can find for this at the moment is this MSDN thread.

like image 157
Michael Petrotta Avatar answered Oct 15 '22 01:10

Michael Petrotta