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

Custom Binding and Editable Kendo Grid

1 Answer 562 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 14 Aug 2014, 05:41 PM
I'm attempting to bind a kendo grid to a model in my MVC application
.BindTo((IEnumerable<Jolt.Web.JoltServiceReference.DealDetail>)ViewBag.Detail)
.Editable(editable => editable.Mode(GridEditMode.InLine))

when ever I run my application, I receive:
An exception of type 'System.NotSupportedException' occurred in Kendo.Mvc.dll but was not handled in user codeAdditional information: There is no DataSource Model Id property specified.

Ids this possible? can you point me to anny whitre papers or reference materails?


1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 18 Aug 2014, 11:56 AM
Hello Randy,

Editing requires to set an ID field via the DataSource Model configuration e.g.
.DataSource(dataSource => dataSource
    .Ajax()
    .Model(model =>
        {
            model.Id(o => o.MyIDField);
        })
Please check the following documentations topics for information on how to setup the grid and the action methods in the different editing modes:

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Randy
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or