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

onClick in Button do not work use Data Binding

I started to learn Data Binding Library https://developer.android.com/topic/libraries/data-binding/index.html I can not understand what not so do. android { .... dataBinding { enabled = true } }
Gennadii Ianchev
  • 129
  • 1
  • 2
  • 11
6
votes
5 answers

Angular 4 - Calling a parent method from a child component not working

All of my event emitters are working properly except for one. child.ts: @Component({ ... outputs: ['fileUploaded'] }) export class childComponent implements OnInit { ... fileUploaded = new EventEmitter(); ... …
Hiding
  • 278
  • 1
  • 3
  • 19
6
votes
5 answers

Data binding in adapter of recyclerView - Android

I am using dataBinding in my project to populate a RecyclerView. How can I handle clicks on items? Here is my XML layout:
6
votes
1 answer

Angular 2: ContenteditableModel: 2-way data binding

I am able to emit an event from the contenteditableModel directive but I am not able to receive the data ' @Input('contenteditableModel') model: any;' i keep getting undefined. contenteditableModelChange works fine, but not contenteditableModel The…
Chris Tarasovs
  • 703
  • 2
  • 21
  • 54
6
votes
3 answers

using IValueConverter with current DataContext in two-way binding

I'm having issues with a converter i'm using to convert between a string and our timeformat. The converter itself works fine and is implemeneted like this: [ValueConversion(typeof(string), typeof(SimpleTime))] public class…
manni
  • 319
  • 3
  • 14
6
votes
1 answer

@ModelAttribute in a method

Imagine a code like this one: @RequestMapping(value="/users", method=RequestMethod.GET) public String list(Model model) { ... } @InitBinder("user") public void initBinder(WebDataBinder binder) { binder.setDisallowedFields("password"); //…
Javi
  • 19,387
  • 30
  • 102
  • 135
6
votes
1 answer

Databinding on Custom Control with ITemplate

this is a sample code of my custom server control : [Designer(typeof(ContainerControlDesigner))] [ToolboxData("<{0}:BlocArrondi runat=server>")] public class BlocArrondi : WebControl { …
Jni
  • 172
  • 2
  • 13
6
votes
5 answers

DataBinding not working at Android Studio 2.3,cannot be cast to android.databinding.tool.expr.StaticIdentifierExpr

after upgrade Android Studio 2.3 today,build my project failed. when build project gradle console show this error: FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:compileChildrenDebugJavaWithJavac'. …
6
votes
1 answer

Navigation Drawer and android data binding

Sorry for my English. I need to process a button click with Android Data Binding. I include in content_main.xml data binding.
6
votes
2 answers

Databound value of textbox/checkbox is incorrect until textbox/checkbox is validated

I have a winforms checkbox that is bound to a property of an Entity Framework entity. So for example, I have bindingSource.DataSource = myDog with a checkbox bound to the property IsSleeping, so that when the user checks the box, IsSleeping becomes…
BlueRaja - Danny Pflughoeft
  • 84,206
  • 33
  • 197
  • 283
6
votes
1 answer

Dynamic textbox binding to a list

I am very new to MVVM and I am stuck with data binding. I have a button on my view page which dynamically creates text boxes but I cannot see how I bind these textboxes to my List in ViewModel. In my view i have:
6
votes
1 answer

Why is the @Output EventEmitter required in this code example?

I'm currently reading about two way data binding in Angular 2 and reading this article. https://blog.thoughtram.io/angular/2016/10/13/two-way-data-binding-in-angular-2.html In this article, there is a child component with an @Input and @Output…
Diskdrive
  • 18,107
  • 27
  • 101
  • 167
6
votes
2 answers

How to set wrapping for HyperlinkButton with databound Content/Text?

I am binding a collection (rss feed) into a list box such as this:
6
votes
4 answers

Binding Date Only and Time Only

I have 2 controls: DatePicker: For Date Only TextBox with TimeMask: For Time Only They are both linked to the same property DateTime EffectiveDate But the problem is when I change the Date on the DatePicker, it changes the Time in the TimeTextBox…
user1702369
  • 1,089
  • 2
  • 13
  • 31
6
votes
1 answer

How can I bind my view model to a jqGrid?

Using MVC2 and EF framework. Most references/blog posts I've found so far pertain to binding a single table and its data (sometimes hierarchical) to a jqGrid with editing capabilities. I don't need this. I don't even need to edit the data--just…
David Fox
  • 10,603
  • 9
  • 50
  • 80