on 09-10-2016 11:52 PM
Hi everyone,
Here is what i am facing:
I have an object like this:
{
"status" : "open",
"items" : [{"title" : "Item 1"}, {"title" : "Item 2"}, {"title" : "Item 3"}]
}
Now i want to show a list of the elements in the "Items" collection. Each list item will have a button that will trigger some logic that should only be available while "status" is "open". So what i would like to do is hide the button when status changes to something else.
This is what i am having trouble with: How do i bind the enabled property on the list item to the "status" property on the parent element?
Any input / suggestion will be greatly appreciated!
Best regards,
Olav
Hi Olav,
You didn't mention which control are you using for template.
With a rough assumption, will this sample help? Plunker
Regards,
Sai.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai
Thank you for you answer. It's close but unfortunately does not solve my issue i think.
A little more details about my example:
The page is bound to the single object i describet above. On the page is a list that uses the "items" collection for its items property. Each element is there by bound to an individual object from the "items" collection.
Now what i want to do is have a button on each element that has its enable property bound to the same property "status" on the main object. It is a "global" status that controls if users can make changes. (of couse alternative solutions are also welcome )
Regard Olav
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.