Questions tagged [two-way-binding]

298 questions
3
votes
2 answers

How can Two-way Data Binding leads to infinite loops?

I'm learning Data Binding by reading up on the official docs. Everything makes sense expect the possible infinite loops in the two-way binding. As per the official docs on two-way binding: Be careful not to introduce infinite loops when using…
Harry
  • 923
  • 8
  • 24
3
votes
2 answers

How does React implement its two-way data binding?

I've seen examples showing how to implement two-way binding in React but none explain how this feature actually functions internally. In this codepen example taken from React's website, if you comment out line 11: handleChange(event) { //…
kazuoua
  • 303
  • 3
  • 9
3
votes
1 answer

ngOnChanges Angular 2 doesn't assign different values

I've got public value cursorUrl and method which checks if url exists and if it exists it assigns urlCursor='pointer' if it doesn't exist it assigns urlCursor='text'. The method seems to work fine, however it assigns every item to…
user122222
  • 1,563
  • 2
  • 20
  • 49
3
votes
1 answer

Little complex Databinding in windows form combobox

I am in trouble while working on Databinding in windows form. I have two classes, one is Project and another is Update. Now all project object is having a list of Updates and it is binded to a combobox, but when the user changes selection need to…
3
votes
1 answer

Android Java Two-Way-Binding on Radio Buttons checked

I have a question referring Radio Buttons when using two-way data binding in Android Java. How can I achieve to place the property android:checked="@={patient.gender}" on a Radio Button when there are two Radio Buttons and I need to change the…
baja
  • 43
  • 3
3
votes
3 answers

Cannot find the getter for attribute 'android:text' with value type java.lang.String on null

I just updated AndroidStudio to 3.0.1 from 2.3 version for one of my projects. AndroidStudio is now complaining about data binding issue when I try to build the project. I am using alpha release of gradle classpath…
lokesh
  • 346
  • 2
  • 15
3
votes
1 answer

Android Data Binding two way binding with array

I want to achieve two-way binding on a array with Data Binding in Android. This is a simplified version of the code I have:
Jelmer Brands
  • 162
  • 2
  • 9
3
votes
2 answers

Angular 2 one way data binding on HTML like we do in angular 1 using ::

Is there any way in angular 2 so that we can achieve one-way data binding like we have done in angular 1.
Ashish Ratan
  • 2,731
  • 20
  • 45
3
votes
1 answer

two-way binding on checkbox ngFor Angular2

I am creating an Angular2 project and having a problem with two-way binding for a checkbox. I have a class called listItem and List like that: export class ListItem { public count: number; public value: string; public checked: boolean; …
Samy Sammour
  • 1,796
  • 1
  • 21
  • 55
3
votes
1 answer

TwoWay Binding ObservableCollection to DataGrid in WPF not working

I have this simple DataGrid in my application. Somewhere in the source I bind the ItemsSource property of it to an ObservableCollection. So the points are shown in the DataGrid. The problem is however I have set the TwoWay…
Hossein Narimani Rad
  • 27,798
  • 16
  • 81
  • 109
2
votes
1 answer

TwoWay binding on "linked" variables (Top/Left & Height/Width) with .NET 4.0

I have encounted a problem when switching to the .NET Framework 4.0. I have a window that uses twoway binding on its Top/Left & Widht/Height properties. A problem occurs when i need to change the viewModel. After changing the underlying ViewModel,…
2
votes
3 answers

Bind XAML elements to entities TwoWay

I want to bind an entity property (say Salary) to a property of a XAML element (like a TextBox.Text) and use this binding to save Text of TextBox to salary field which is bound as a entity property to 'Text' of some TextBox. Something like the…
Mohsen
  • 3,224
  • 7
  • 32
  • 62
2
votes
1 answer

How to bind SWIFTUI Button action to viewmodel action or method

I am trying to bind swiftui button action and getting the error like Cannot convert value of type 'Binding<() -> ()>' to expected argument type '() -> Void' In View Button(action : $viewModel.action ) { Text("Login") …
Prathap
  • 299
  • 2
  • 11
2
votes
0 answers

Kotlin two-way data binding bug when property contains `is_`

There appears to be a significant bug in the way the data binding compiler (or possibly kapt) works. Two-way data binding fails miserably if the property being bound to is prefixed with is_, with perhaps the world's most useless gradle error…
rmirabelle
  • 4,729
  • 3
  • 36
  • 36
2
votes
1 answer

Why two-way bound component updates twice in Svelte?

I have a