Binding data to popup window

2 posts, 0 answers
  1. Joe
    Joe avatar
    220 posts
    Member since:
    May 2012

    Posted 15 Jun 2017 Link to this post

    I have an MVC page that is displaying certain data via a series of observable variables (or actually properties since it's an viewModel object).  All simple stuff as it relates to MVVM really.  Everything works really well.  Change the value of the variable, and the data in the appropriate spans within the page updates automagically.  Love it.

    However, now I'm adding a Kendo Window, initially not visible when the page loads.  When the user presses a button, I want the window to open with a form for editing the data.  I've added the appropriate html inputs, and also added the data binding on the control to the same MVVM variables used to display on the page, but when I open the dialog, the data isn't populated with the MVVM variables that are otherwise displaying a-ok on the screen.

    Sure, upon the opening of the window, I could use jQuery to populate the form, but I wanted to use the bound MVVM variables.

    So is there a trick to this?  I'm no stranger to the concept of MVVM having used Knockout for a long while before switching to the Telerik MVVM.  I've been using it for close to a year, but always just to display data updates on a screen via an ajax call.  (after an AJAX call, setting the appropriate viewModel properties, and they update on the bound spans within the page).

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 19 Jun 2017 Link to this post

    Hello Joe,

    Eventually in order to help you in more efficient way we would need an example that shows the described problem. For example there is a Edit Records Using External Forms that shows how to use a completely separate form using MVVM to edit records in the Kendo UI Grid. Could you please modify or prepare a new sample to replicate the problem? 

    Regards,
    Boyan Dimitrov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top