MVVM set viewModel property Error

2 posts, 0 answers
  1. Neeraj
    Neeraj avatar
    139 posts
    Member since:
    May 2015

    Posted 08 Jun 2018 Link to this post

                  I have viewModel and model that has additional property. Following Statements get executed

    $.extend(viewModel, kendo.observable(model));
    var RData = viewModel.Receipts;
    var TstDataSource = new{
                        data: RData,
                        group: [{ field: "Code", dir: "asc" }]
    kendo.bind($("#Container"), viewModel);

    On viewModel.set("Receipts",TstDataSource);    , i get error maximum call stack size exceeded. 

    Receipts property is bind to Grid in MVVM

    When i use viewModel.Receipts=TstDataSource it works, i just wanted to know why it works . And then should i update the Item in Receipts using 'set' or '=' ?
    P.S: viewmodel is not global




  2. Ivan Danchev
    Ivan Danchev avatar
    2150 posts

    Posted 12 Jun 2018 Link to this post

    Hello Neeraj,

    Do you get the exception only when Receipts is bound to the Grid, or it is thrown event without binding it to the Grid? Could you post a dojo example that demonstrates the issue?

    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 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