Questions tagged [two-way-binding]
298 questions
17
votes
2 answers
DataGridTemplateColumn Two way binding is not working
I've got a datagrid I've bound to a SqlDataApter. If I set up the XAML for the grid using DataTextColumn as illustrated in the code below it works perfectly
![](../../users/profiles/2679568.webp)
David Potter
- 171
- 1
- 1
- 4
15
votes
1 answer
How to update the text of all EditTexts elements in a RecyclerView with two-way data binding
I have an RecyclerView which holds some CardViews and each CardView contains EditText which multiplies the user given amount times a specific rate (the rate comes from an endpoint and the rate is different per row). For the CardViews I am using data…
![](../../users/profiles/7661706.webp)
Fahri Can
- 353
- 2
- 10
12
votes
3 answers
How to accomplish two-way data binding in WPF?
I have heard a lot about two-way bindings in WPF, but I'm not entirely clear on how to accomplish it or what it actually means.
I have a ListView with a bunch of items in it. When the user selects a new item, a TextBox in the application will change…
![](../../users/profiles/283739.webp)
Deniz Dogan
- 23,833
- 33
- 104
- 154
11
votes
5 answers
Angular Two-Way Data Binding and Watching for Changes in Parent Component
It seems there is no way to watch changes in the parent component when using two-way data binding.
I have a custom input component for collecting a tag list. Two-way data binding is setup and working between this component and its parent.
// the…
![](../../users/profiles/1440240.webp)
Ben Racicot
- 4,039
- 8
- 42
- 96
11
votes
1 answer
Cannot assign to read only property 'dataChange' of object '#'
I am trying to use a two way binding in Angular 4. Here is my component code:
@Component({
selector: 'form-validation',
templateUrl: './form.validation.template.html',
encapsulation: ViewEncapsulation.None
})
export class…
![](../../users/profiles/1765182.webp)
fred00
- 521
- 2
- 6
- 22
10
votes
2 answers
Two way binding on angular 6 reactive form
I am trying to create a complex reactive form with nested component that is populated with a data object.
The behavior I am trying to achieve is very similar to the two-way data binding of a template-driven form: when the user edits an input of the…
![](../../users/profiles/4300620.webp)
Idan Abrashkin
- 141
- 2
- 6
10
votes
3 answers
How can I bind an ObservableCollection to TextBoxes in a DataTemplate?
I am trying to successfully TwoWay bind an ObservableCollection to TextBoxes in a DataTemplate. I can get the data to display properly, but I am unable to change the list data through the UI. I have a Model class named 'model' which contains an…
![](../../users/profiles/130851.webp)
Johnathan1
- 1,973
- 4
- 21
- 24
9
votes
3 answers
Two way binding between components in angular 2-4
I would like the child component value to be bound to the parent component. How to accomplish this when @Input() and [(ngModel)] are not enough ?
here is a plunker
![](../../users/profiles/733889.webp)
Bellash
- 5,719
- 3
- 39
- 72
8
votes
2 answers
Angular textarea matInput: how can set max length/line + max number of lines
The following html snippet of code:
…
![](../../users/profiles/3275464.webp)
Learning is a mess
- 3,886
- 3
- 24
- 56
8
votes
3 answers
Handle Model Change in Angular 5 Component (Two-way-binding)
I'm currently working on an angular 5 application. I try to alter a member variable of my component in an input on the view and use the variable in my component after the change.
My structure is as follows:
Folder: my-test
my-test.component.html…
![](../../users/profiles/1490878.webp)
TimHorton
- 797
- 3
- 10
- 28
6
votes
2 answers
Pass values to child component Angular 7
I went though this, and understand that after declaring a data-bound input property, Angular should automatically update the input value. In the component I created, it doesn't seems like that.
When I click on a item on the grid on the parent it…
![](../../users/profiles/10919587.webp)
Robert Nish
- 81
- 1
- 1
- 6
6
votes
3 answers
Two way binding on custom view
I have a componed view in android contains several textViews and one EditText. I defined an attribute for my custom view called text and getText, setText methods. Now I want to add a 2-way data binding for my custom view in a way its bind to inner…
![](../../users/profiles/2390217.webp)
Alireza A. Ahmadi
- 4,234
- 4
- 36
- 57
6
votes
3 answers
two-way binding - nested object - angular - Cannot read property of undefined
I want to use [(ngModel)] for a nested object, but is giving me an error
Cannot read property 'mxn' of undefined
these are the data structure of my models:
company.model.ts
import Currency from './currency.model';
class Company {
_id: string;
name:…
![](../../users/profiles/7859398.webp)
Milad
- 95
- 1
- 10
6
votes
2 answers
Angular 2 - How to get rid of extra decimals in angular binding?
i have such a statement in my view and the binding has value lets says 6970.87127381382131831 but, i want to limit it at 2 decimal at most. Since i am listing elements with ngFor, could not use an object to limit it with .toFixed(2). Thank you all…
![](../../users/profiles/6667223.webp)
ozercevikaslan
- 450
- 5
- 21
5
votes
3 answers
Two-way data binding with converter doesn't update source
I've got a data binding set up with a converter to transform an awkward XML source to a display- and editing- convenient tree of internal classes. Everything works great for reading from the XML source, but I'm having a devil of a time trying to…
![](../../users/profiles/301152.webp)
dthorpe
- 33,791
- 3
- 72
- 118