This is a migrated thread and some comments may be shown as answers.

Grid inline edit with local datasource from mvvm

1 Answer 212 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 1
Roland asked on 07 Aug 2012, 02:41 PM
Hi

I have a local kendo.observable viewmodel which i bind to my grid with the data-bind="source:ProductionReports" attribute like the following

@Html.Kendo.Grid(Of CProductionReportViewModel).Name("CreateEditProductionReportGrid").Columns(Sub(col)
   col.Bound(Function(x) x.ShiftDefinitionId)
   col.Bound(Function(x) x.ReportDateFrom)
   col.Bound(Function(x) x.ReportDateTo)
   col.Bound(Function(x) x.ArticleVariantId)
   col.Bound(Function(x) x.PacInstructionId)
   col.Bound(Function(x) x.CustomerId)
  End Sub).HtmlAttributes(new Dictionary(Of String, Object) From {{"data-bind", "source:ProductionReports"},{"data-editable","inline"},{"data-sortable","true"}})


All data get displayed properly, but how can I configure the grid for inline editing? 

data-editable="inline"

doesnt work and if I define the ASP.NET MVC Wrapper to enable inline editing then I need a DataSource to a Controller Method!
But I just want that it update my local kendo.observable viewmodel.

Regards
Roland

1 Answer, 1 is accepted

Sort by
0
Roland
Top achievements
Rank 1
answered on 13 Aug 2012, 12:49 PM
Maybe I have to render the grid with plain KendoUI and not with the ASP.NET MVC Helper Controls? But with the ASP.NET MVC Controls I would have my userdefined DisplayTemplates and EditorTemplates...

Anybody has a best practice about that? I want to have a local ViewModel with Kendo.Observable

Thanks for helping
Roland
Tags
Grid
Asked by
Roland
Top achievements
Rank 1
Answers by
Roland
Top achievements
Rank 1
Share this question
or