I need to know what the grid syntax for an update looks like in VB.. the lack of vb documentation is shocking.
I tried this code, but the update callback never fires, but it doesn't complain about it either.
@Code
Html.Kendo().Grid(Of FAQRecord)() _
.Name("FAQGrid") _
.Columns(Sub(c)
c.Bound(Function(faq) faq.FAQID)
c.Bound(Function(faq) faq.Question)
c.Bound(Function(faq) faq.Answer)
c.Command(Sub(e) e.Edit()).Width(160)
End Sub) _
.Pageable() _
.Sortable() _
.Filterable() _
.Editable(Function(edit) edit.Mode(GridEditMode.PopUp)) _
.DataSource(Function(d)
d.Ajax() _
.Read(Function(read) read.Action("FAQ_Read", "Home")).Model(Sub(rs) rs.Id(Function(rf) rf.FAQID)) _
.Update(Function(update) update.Action("FAQ_Update", "Home"))
End Function) _
.Render()
End Code
The controller signature looks like this:
Function FAQ_update(request As DataSourceRequest, data As FAQRecord) As ActionResult
'do stuff
Return Json(result.ToDataSourceResult(request, ModelState))
End Function
I tried this code, but the update callback never fires, but it doesn't complain about it either.
@Code
Html.Kendo().Grid(Of FAQRecord)() _
.Name("FAQGrid") _
.Columns(Sub(c)
c.Bound(Function(faq) faq.FAQID)
c.Bound(Function(faq) faq.Question)
c.Bound(Function(faq) faq.Answer)
c.Command(Sub(e) e.Edit()).Width(160)
End Sub) _
.Pageable() _
.Sortable() _
.Filterable() _
.Editable(Function(edit) edit.Mode(GridEditMode.PopUp)) _
.DataSource(Function(d)
d.Ajax() _
.Read(Function(read) read.Action("FAQ_Read", "Home")).Model(Sub(rs) rs.Id(Function(rf) rf.FAQID)) _
.Update(Function(update) update.Action("FAQ_Update", "Home"))
End Function) _
.Render()
End Code
The controller signature looks like this:
Function FAQ_update(request As DataSourceRequest, data As FAQRecord) As ActionResult
'do stuff
Return Json(result.ToDataSourceResult(request, ModelState))
End Function