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.

Ref:

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
6
votes
8 answers

angularJS how to calculation for ng-repeat data shown in input element

I have JSON data of items=[]; displayed in (1st table) using ng-repeat. The user then can add this row using the ng-repeat $index to another array itemsPOS=[] by using push() function, this array then is displayed in another (2nd…
aintno12u
  • 341
  • 4
  • 23
6
votes
2 answers

ListView Binding with "IsSelected" Property of ListViewItem

I have following class public abstract class AbsTrinityEvent { public event IsSelected OnSelectedEvent; bool _IsSelected; ITrinityEvent _objTrinityEvent; public AbsTrinityEvent(ITrinityEvent objTrinityEvent) { …
sandeep
6
votes
2 answers

Android MVVM + DataBinding RecyclerView

i'm trying to implement MVVM architecture + DataBinding + RxJava. i have an activity with RecyclerView. as i understand the ViewModel should not have a reference to the View. what's the correct way in MVVM to pass the data list from the ViewModel to…
stav elmashally
  • 193
  • 2
  • 8
6
votes
1 answer

BindingList not updating bound ListBox

I have a ListBox that is bound to a BindingList. The BindingList is built up when a third party application raises an event. I can see the BindingList being bound correctly... but nothing enters the ListBox. I have used the exact same logic with…
wulfgarpro
  • 6,666
  • 12
  • 69
  • 110
6
votes
3 answers

Data binding adapter. How to get view by id reference?

I want to specify view reference as atribute to ImageView @BindingAdapter(value = {"imageUrl", "progressView"}, requireAll = false) public static void setImageUrl(ImageView imageView, String url, @IdRes int progressBar) { Context context =…
Chickin Nick
  • 517
  • 1
  • 6
  • 21
6
votes
1 answer

Editing table data in Angular 4

I am simply trying to display, add, delete & update the employee table in Angular. Here is the image of the table: As of now I have disabled each field of the table. Whenever i click on 'Edit' button i want the field of the corresponding row to be…
Saigal Amatya
  • 383
  • 1
  • 8
  • 22
6
votes
2 answers

Cannot bind empty textbox to nullable decimal with MVVM light

Is there any solution to binding a textbox to a nullable decimal? Whenever you leave the textbox empty the binding is not updated. I know one solution is to use a string property instead but I really don't want to do it that way.
mariafoss
  • 83
  • 3
6
votes
5 answers

Cannot find source for binding with reference 'RelativeSource FindAncestor

I am using a compositecollection: Comboboxitem with content "Select a vendor" Collectioncontainer bound to a Observablecollection of Vendor objects The desired functionality: the user has to select a vendor from the combobox. Selecting "Select a…
BertAR
  • 425
  • 3
  • 18
6
votes
7 answers

Binding a DropDownList in ListView InsertItemTemplate throwing an error

I've got a ListView which binds to a LinqDataSource and displays selected locations. The insert item Contains a dropdownlist that pulls from another LinqDataSource to give all the unselected locations. The problem is that I get the following error…
CodeRedick
  • 7,346
  • 7
  • 46
  • 72
6
votes
6 answers

Silverlight DataBinding cross thread issue

I have an Image control with it's source bound to a property on an object(string url to an image). After making a service call, i update the data object with a new URL. The exception is thrown after it leaves my code, after invoking the…
Brian Leahy
  • 34,677
  • 12
  • 45
  • 60
6
votes
2 answers

Binding to the whole data item in XAML

I'm using XAML data binding for a ListBox whose ItemSource is set to a list of TypeA object. One UI element in the ItemTemplate for the ListBox is bound to a property of TypeA as follows: Source="{Binding PropertyName, Converter={StaticResource…
Buu
  • 49,745
  • 5
  • 67
  • 85
6
votes
1 answer

Angular: How to data-bind an async property to a background image

I'm trying to set a background image on a div with angular. The 'image.imagrURL | async' works well when just assigning it to a plain 'img' tag. The issue I'm having is when trying to assign it to an inline background image The question is:…
user8516249
6
votes
1 answer

Form validation disable submit button until all fields are filled in WPF

Given: WPF 4.0 desktop-based application. Basic input form with two TextBox fields and submit button. XAML-code:
6
votes
1 answer

Failed resolution of: Landroid/databinding/DataBindingUtil : java.lang.NoClassDefFoundError:

Here is my gradle file buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' } } allprojects { repositories { jcenter() …
Ravi
  • 34,851
  • 21
  • 122
  • 183
6
votes
2 answers

Inflate method using DataBindingComponent

I see this error while updating a textview once the image has been successfully rendered by Glide. Fatal Exception: java.lang.IllegalStateException: Required DataBindingComponent is null in class CustomBinding. A BindingAdapter in…
user3133966
  • 193
  • 1
  • 12