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
3 answers

WPF: Implementing and binding (datagrid) to a custom collection

I have a custom collection that I am passing to a WPF client, which is binding the collection to a datagrid using AutoGenerateColumns="True". The datagrid, however, is displaying empty rows (albeit the right number of empty rows). What am I doing…
joniba
  • 3,339
  • 4
  • 35
  • 49
6
votes
1 answer

Kotlin 2-way binding custom view

I have 1 custom view that extends ConstraintLayout and contains 1 EditText and 2 TextViews On my custom view i define this attr (and others) : and i use it like : app:Text="@={login.email}" Inside my custom…
BejanCorneliu
  • 65
  • 3
  • 13
6
votes
4 answers

Getting results from a stored procedure to populate a GridView

I have a windows aspx form that I have a TextBox, Button and a GridView. The TextBox is stored as a variable @subschedule and passed to a stored procedure. What I'd like to do is to populate the results of that procedure into my GridView. Can anyone…
Doug Ancil
  • 469
  • 2
  • 5
  • 11
6
votes
1 answer

How to implement Livedata and Databinding in Android?

I searched a lot about observable models and parameters but I got confused! 1-some of model extend from BaseObservable and setnotifyChange(); in setters and bind them for example to edittext like this:…
6
votes
1 answer

Asp.net core razor pages [BindProperty] doesnt work on collections

Im trying to use [BindProperty] annotation in asp.net core razor pages in order to Bind an Ilist collection of one of my model classes so i can edit some of them at once, but it doesnt work at all, every time in OnPostAsync function the…
F_IVI_L
  • 940
  • 9
  • 17
6
votes
4 answers

Binding with CollectionViewSource

I am trying to implement some combo box sorting using CollectionViewSource. This combo box is actually part of a data template and is repeated in a list view. My first approach seemed to work (using CollectionViewSource) but all my combo boxes…
SRM
  • 1,377
  • 1
  • 10
  • 17
6
votes
2 answers

Android-Binding "type" associated with an element type "variable" must not contain the '<' character

I get the following error: The value of attribute "type" associated with an element type "variable" must not contain the '<' character. And type="ObservableField"/> is colored red in xml. Any ideas?
Nick
  • 2,818
  • 5
  • 42
  • 60
6
votes
2 answers

Angular - Impure pipe vs function

I am implementing a filtering operation on an array in Angular2. A pure pipe is not triggering when an element change in the array. Thus, I have to use either an impure pipe or make the filtering with a function inside of the component like…
6
votes
1 answer

C# DGV - Show Live MYSQL DB table

I have a scenario where I have multiple users (around 50 at one time) connected to one table all make changes constantly to rows that already exist. What I need to do is somehow always show a live view of the database. Having a cached copy of the…
Marcello B.
  • 4,177
  • 11
  • 45
  • 65
6
votes
2 answers

wp7 strange UnhandledException on databinding 0x8000ffff

I am getting a strange unhandled exception during databinding. I am databinding a ListBox with an IList. After populating the list with the objects, I set the DataContext of the ListBox to my object: IList users = new…
wp7dev
  • 83
  • 1
  • 4
6
votes
2 answers

how to import public static field from class in android data binding

I want to import some string from interface constant in android layout data binding. Gradle build fails if i use this line android:drawableRight="@{item.icon.equalsIgnoreCase(Constants.FOOD_TYPE_NON_VEG)? @drawable/ic_nonveg :…
Khemraj Sharma
  • 57,232
  • 27
  • 203
  • 212
6
votes
1 answer

How to bind a many-to-many relation in WinForms?

I have the following DataSet: The Product and Part tables can be edited using these DataGridViews: When the user double-clicks a row in the Products grid, the following form opens: The left column is supposed to list the parts associated with…
Ron Inbar
  • 2,044
  • 1
  • 16
  • 26
6
votes
3 answers

BindingAdapter with lambda as argument

With Android databinding, I can do the following: My ViewModel does not have to implement…
fweigl
  • 21,278
  • 20
  • 114
  • 205
6
votes
2 answers

How to select a row in Angular 5

I'm verrryyyyy new to Angular, so please understand me :) I have a list of users, that are displayed like this: Here is my HTML: EDIT - ADDED CRUD BUTTONS :
billy_56
  • 649
  • 3
  • 11
  • 27
6
votes
1 answer

Forcing a data-bound Windows Forms checkbox to change property value immediately when clicked

I have an object that implements INotifyPropertyChanged, and a checkbox that is bound to a boolean property of that object. This works, but I've found that when I check or uncheck the checkbox, the bound property of the object is not updated until I…
Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302