Calling Viewmodel Method from HTML markup?

2 posts, 0 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    May 2013

    Posted 07 Jun 2013 Link to this post

    Is it possible to call a viewmodel method from within the markup for a viewmodel?
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 11 Jun 2013 Link to this post

    Hello Michael,

    I am not sure what exactly you would like to achieve. In general it is possible to execute a ViewModel method when a certain event occurs - for example when an HTML button is clicked. For example:
    Another possible option is to bind a field to a MVVM method which calculates and returns its value. For more information please check the corresponding docs.
    In both cases the ViewModel method is called via data-bind attribute.

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top