Questions tagged [data-binding]

A general technique that binds two data/information sources together and maintains them in sync.

Data binding is a general technique that binds two data/information sources together and maintains them in sync. This is usually done with two data/information sources with different types as in data binding. However, in UI data binding, data and information objects of the same type are bound together (e.g. objects to Java UI elements).

If the binding has been made in the proper manner, then, each data change is reflected automatically by the elements that are bound to the data. The term data binding is also used in case where an outer representation of data in an element changes, and the underlying data is automatically updated to reflect this change. As an example, a change in a TextBox element could modify the underlying data value.


WPF DataBinding: Windows Presentation Foundation () data binding provides a simple and consistent way for applications to present and interact with data. Elements can be bound to data from a variety of data sources in the form of common language runtime () objects and XML.

23688 questions
14 answers

How does data binding work in AngularJS?

How does data binding work in the AngularJS framework? I haven't found technical details on their site. It's more or less clear how it works when data is propagated from view to model. But how does AngularJS track changes of model properties without…
  • 23,199
  • 3
  • 26
  • 26
51 answers

Jackson with JSON: Unrecognized field, not marked as ignorable

I need to convert a certain JSON string to a Java object. I am using Jackson for JSON handling. I have no control over the input JSON (I read from a web service). This is my input JSON: {"wrapper":[{"id":"13","name":"Fred"}]} Here is a simplified…
  • 9,781
  • 3
  • 18
  • 10
14 answers

How do I use WPF bindings with RelativeSource?

How do I use RelativeSource with WPF bindings and what are the different use-cases?
David Schmitt
  • 58,259
  • 26
  • 121
  • 165
11 answers

How to bind RadioButtons to an enum?

I've got an enum like this: public enum MyLovelyEnum { FirstSelection, TheOtherSelection, YetAnotherOne }; I got a property in my DataContext: public MyLovelyEnum VeryLovelyEnum { get; set; } And I got three RadioButtons in my WPF…
  • 28,421
  • 49
  • 167
  • 247
14 answers

INotifyPropertyChanged vs. DependencyProperty in ViewModel

When implementing the ViewModel in a Model-View-ViewModel architecture WPF application there seem to be two major choices how to make it databindable. I have seen implementations that use DependencyProperty for properties the View is going to bind…
  • 48,890
  • 37
  • 186
  • 278
1 answer

ListBox vs. ListView - how to choose for data binding

I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to search/sort/filter based on user input. The data…
Geoff Cox
  • 6,102
  • 2
  • 27
  • 30
15 answers

How to Implement DOM Data Binding in JavaScript

Please treat this question as strictly educational. I'm still interested in hearing new answers and ideas to implement this tl;dr How would I implement bi-directional data-binding with JavaScript? Data Binding to the DOM By data binding to the DOM I…
Benjamin Gruenbaum
  • 270,886
  • 87
  • 504
  • 504
14 answers

Ng-model does not update controller value

Probably silly question, but I have my html form with simple input and button: {{ searchText }} Then in the controller (template and controller are called from…
  • 5,084
  • 6
  • 22
  • 21
15 answers

Angular 2 Checkbox Two Way Data Binding

I´m fairly new to Angular2 and I have a little problem: In my Login-Component-HTML, I have two checkboxes, which I want to bind in two way data-binding to the Login-Component-TypeScript. This is the HTML:
4 answers

How to bind multiple values to a single WPF TextBlock?

I'm currently using the TextBlock below to bind the value of a property named Name: Now, I want to bind another property named ID to the same TextBlock. Is it possible to bind two or more values to the same…
Spen D
  • 4,225
  • 9
  • 39
  • 47
3 answers

WPF Databinding: How do I access the "parent" data context?

I have a list (see below) contained in a window. The window's DataContext has two properties, Items and AllowItemCommand. How do I get the binding for the Hyperlink's Command property needs to resolve against the window's DataContext?
  • 2,811
  • 2
  • 20
  • 21
22 answers

How to bind an enum to a combobox control in WPF?

I am trying to find a simple example where the enums are shown as is. All examples I have seen tries to add nice looking display strings but I don't want that complexity. Basically I have a class that holds all the properties that I bind, by first…
Joan Venge
  • 315,713
  • 212
  • 479
  • 689
4 answers

Binding a WPF ComboBox to a custom list

I have a ComboBox that doesn't seem to update the SelectedItem/SelectedValue. The ComboBox ItemsSource is bound to a property on a ViewModel class that lists a bunch of RAS phonebook entries as a CollectionView. Then I've bound (at separate times)…
Geoff Bennett
  • 2,513
  • 2
  • 16
  • 13
7 answers

AngularJS - Binding radio buttons to models with boolean values

I am having a problem binding radio buttons to an object whose properties have boolean values. I am trying to display exam questions retrieved from a $resource. HTML:
5 answers

KnockOutJS - Multiple ViewModels in a single View

I'm thinking that my application is getting quite large now, too large to handle each View with a single ViewModel. So I'm wondering how difficult it would be to create multiple ViewModels and load them all into a single View. With a note that I…
  • 13,665
  • 48
  • 124
  • 205
2 3
99 100