Hi,
I defined a ViewModel with an ObservableArray as "items". Then I bound "items" to the grid with data-bind="source: items".
The grid is data-editable="inline" and there are edit and destroy commands defined.
Data from ObservableArray displays ok in the grid.
Delete button works ok.
But when I edit a row, after any action ("update" or "cancel") the grid became empty and no data is shown anymore.
This is the grid configuration:
and this is the viewmodel configuration:
Is it anything wrong?
Thanks in advance
I defined a ViewModel with an ObservableArray as "items". Then I bound "items" to the grid with data-bind="source: items".
The grid is data-editable="inline" and there are edit and destroy commands defined.
Data from ObservableArray displays ok in the grid.
Delete button works ok.
But when I edit a row, after any action ("update" or "cancel") the grid became empty and no data is shown anymore.
This is the grid configuration:
<div id="gridMediciones" data-role="grid" data-bind="source: items" data-sorteable="true" data-scrollable="true" data-groupable="true" data-editable="true" data-columns="[ 'Nombre', 'VolumenEstandar', 'Volumen', {command: ['destroy'], title:' '} ]" ></div>var viewActions = function ($grid) { var data = { items: [ { Id: 1, Nombre: "Medidor 1", VolumenEstandar: 100, Volumen: 200 }, { Id: 2, Nombre: "Medidor 2", VolumenEstandar: 200, Volumen: 300 }, { Id: 3, Nombre: "Medidor 3", VolumenEstandar: 300, Volumen: 400 }, ] }, viewModel = kendo.observable(data); return { viewModel: viewModel };}($("#gridMediciones"));
//inicialización de la vista
$(function () { kendo.bind($("body"),viewActions.viewModel);});Is it anything wrong?
Thanks in advance