Skip to Content
author's profile photo Former Member
Former Member

Can I dynamically add property to the model by changing the property of controls with data binding?

Hi all,

I try to bind model to the control —item. And the property 'selected' bind to model which is undefined by default. Whether the property will be added if I select this item? I try it and found it can't be created. So the way is to catch the select event and call setProperty of model to add it? Thanks for any suggestion.

Thanks,

Mengchi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 21, 2016 at 08:47 AM

    Hi Mengchi,

    You mean something like this? Plunker

    Checked is a property added in the model. And once you check the combobox placed in each item, you see the value gets changed to true / false.

    Working Snippet:

    Regards,

    Sai.


    Capture.gif (266.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.