This is a migrated thread and some comments may be shown as answers.
MVVM set viewModel property Error
1 Answer 11 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Neeraj asked on 08 Jun 2018, 08:28 AM
              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




1 Answer, 1 is accepted

Sort by
Ivan Danchev
Telerik team
answered on 12 Jun 2018, 06:37 AM
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.
Asked by
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question