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

WPF DataGrid Binding to datatable

This is driving me nuts. I am creating a DataGrid in code and then binding it to a datatable. This is dynamic and the rows and columns will be different everytime the grid is created. Basically I loop through my datatable and create DataGrid…
Emad
  • 4,110
  • 5
  • 30
  • 35
6
votes
1 answer

How to implement databinding for windows custom control?

Basically, I am confused about how to implement databinding on the control side. I am trying to write a custom list control in C#, which implements databinding. I want it to end up having similar functionality to the ListView, but with an interface…
Tim
  • 361
  • 1
  • 5
  • 14
6
votes
4 answers

AngularJs Return HTML from Controller

I try to return some HTML code from my AngularJs controller to the html data. This is path of my html :
{{chooseHtmlElement()}}">
And this is path of my AngularJs Controller: $scope.chooseHtmlElement= function () { …
ANEDev
  • 111
  • 1
  • 6
6
votes
4 answers

Binding to Static class property and StringFormat

I am able to bind a static class property to a MenuItem header, but I cannot determine how to include a StringFormat so that I can display hard-coded text in addition to the property. Is this possible? Currently: (Displays…
Joe Bauer
  • 572
  • 1
  • 9
  • 22
6
votes
4 answers

WPF binding of string property and Button.Content

I want to bind string property with Button.Content. But why it didn't work? The data class: namespace test4 { public class Test : INotifyPropertyChanged { string _Text = "Begin"; public string Text { …
Begtostudy
  • 1,374
  • 4
  • 13
  • 28
6
votes
2 answers

Grouping data in WPF treeview

I want to create a WPF TreeView with two grouping options (radio buttons). So the data will be grouped in two different ways in a 2-level hierarchy, the lowest level being the actual data items, and the groups being just a way to represent the data…
Koen
  • 3,626
  • 1
  • 34
  • 55
6
votes
2 answers

One-line font applying using Android-M data-binding doesn't work

I'm trying to apply some custom font to my TextView with one line as described in a post by Lisa Wray. The TextView is part of an item that goes into a RecyclerView I've added data binding dependency to my top level build file. classpath…
6
votes
2 answers

Content generated from ContentTemplate does not have DataContext of Silverlight ContentControl set

In my Silverlight 4 application, I have a ContentControl with its ContentTemplate property bound to a property in the data context. That works fine. However, the content of the template once rendered has its DataContext set to null. I would like…
Jacob
  • 77,566
  • 24
  • 149
  • 228
6
votes
2 answers

SAPUI5: Retrieve model object in controller

I have a master-detail application that consumes an OData service (declared in manifest.json). In the detail controller, I bind the model to the view in the following way (this method is attached to a router object). _onObjectMatched:…
Marc
  • 6,051
  • 5
  • 26
  • 56
6
votes
1 answer

Is there a way to use a ViewStub inside a RecyclerView?

i'm new to android, I've been working on a project, and in my news feeds page, I'm trying to include a modular feed RecyclerView, which shows a question with different answer forms, varrying according to the Question type. The way I was doing it so…
6
votes
5 answers

Data binding between two Polymer elements using polymer 1.0

Question In the below example, how do I bind the obj.name variable of the field in to ? Background: Below is my code. I have two polymer elements. test-element has the data binded to obj.name. test-element2…
6
votes
1 answer

Polymer 1.0 dom-repeat display index starting at 1

I am using Polymer 1.0 to create a shopping/checkout cart. I have customers who may want to ship their order to multiple addresses. In the receipt, I need to list all the addresses with an index: Address 1 John Doe 1234 Main St ... Address 2 Jane…
bjschoenfeld
  • 402
  • 6
  • 14
6
votes
1 answer

Winforms Binding a ComboBox SelectedItem to an Object Property

I have two simple classes: public class Customer { public String CustomerID { get; set; } public String Forename { get; set; } public String Surname { get; set; } } and public class Order { public String OrderID { get; set; } …
suffolkml
  • 85
  • 1
  • 2
  • 6
6
votes
4 answers

Fill dataGridView thank's to backGroundWorker

I have this code snippet: private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { remplirDataGrid(); } private void frmChercherActesLoad(object sender, EventArgs e) { …
Rad
  • 4,403
  • 4
  • 24
  • 25
6
votes
2 answers

Convert value into lower case before knockout binding

Demo Here I bound a label with knockoutjs. The value bound always should be in lower case. While it will remain in uppercase in js model. How to do this ? Javascript var model = { name:ko.observable("Test")…
Sudarshan Tanwar
  • 3,537
  • 3
  • 24
  • 39
1 2 3
99
100