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

Overload resolution failed using Model in the Datasource

2 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 17 Aug 2018, 07:43 AM

Hello,

we´ve just bought DevCraft and to get into the stuff, I´ve programmed a little application. But I have a problem with the Grid. Using the Model-Function in the DataSource I get a "Overload resolution failed"-Exception, but I don´t see why. When I remove the "Model"-Part in the Datasource the exception disappears

@Html.Kendo.Grid(Model.Pruefdienste).Name("grdAdress") _
                                    .ToolBar(Sub(t)
                                      t.Create()
                                      t.Save()
                                    End Sub) _
.Editable(Sub(e)
                                      e.DisplayDeleteConfirmation(True)
                                      e.Mode(GridEditMode.PopUp)
                                    End Sub) _
.Columns(Sub(cols)
                                      cols.Select()
                                      cols.Bound(Function(c) c.IDAdress).Hidden()
                                      cols.Bound(Function(c) c.Name)
                                      cols.Bound(Function(c) c.Street)
                                      cols.Bound(Function(c) c.ZIP)
                                      cols.Bound(Function(c) c.City)
                                      cols.Bound(Function(c) c.Email)
                                      cols.Bound(Function(c) c.www)
                                      cols.Bound(Function(c) c.Phone)
                                    End Sub) _
    .Pageable(Sub(p)
                                       p.PageSizes(True).PageSizes(New Integer() {20, 50, 100})
                                    End Sub) _
.Sortable.Filterable.Groupable.Scrollable(Sub(s) s.Height("auto")) _
.DataSource(Sub(ds)
                                      ds.Ajax().Model(Sub(model) model.Id("IDAdress")).Read(Sub(read) read.Action("GetAdresses", "Adress").Data("filterGrid"))
                                     End Sub)

I have also tried  

ds.Ajax().Model(Function(model) model.Id(Function(mo) mo.IDAdress)).Read(Func...

but without success.

Thank you very much for your help.

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 21 Aug 2018, 05:01 AM
Hello Martin,

Please refer to the following help topic for the Visual Basic syntax: 
Hope this helps.
 

Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Martin
Top achievements
Rank 1
answered on 22 Aug 2018, 04:19 AM

Hello Konstantin,

thank you for your help.

I´ve found the problem. I have added the Create-function in the ToolBar, so I have to add it also in the Datasource.

Best regards,
Martin

Tags
Grid
Asked by
Martin
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Martin
Top achievements
Rank 1
Share this question
or