I have a problem on sorting and filtering in grid. I already read and tried some threads in this forums but still not working.
I hope you could help me on this.
Thank you and God bless...
Here's my code below:
Html.Kendo().Grid(Of SPIMS.ViewModel.EventViewModel.Index)() _
.Name("grid") _
.Columns(Sub(c)
c.Bound(Function(p) p.ID).HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"}).Width(10)
c.Bound(Function(p) p.CreatedDate).Format("{0:dd/MM/yyyy}").Width(20).Title("Date").HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"})
c.Bound(Function(p) p.Source).HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"}).Width(20)
c.Bound(Function(p) p.Message).HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"}).Width(50).Title("Description")
c.Command(Sub(commands)
commands.Custom("View").Click("showDetails")
End Sub).Title(" ").Width(10)
End Sub) _
.Scrollable() _
.Sortable _
.Filterable() _
.Pageable(Sub(pager)
pager.Input(True)
pager.Numeric(True)
pager.Input(True)
pager.PreviousNext(True)
pager.Refresh(True)
pager.PageSizes(True)
pager.ButtonCount(10)
End Sub) _
.HtmlAttributes(New With {.style = "height:450px;width:900px;"}) _
.DataSource(Sub(d)
d.Ajax() _
.PageSize(10) _
.Model(Sub(model) model.Id(Function(p) p.ID)) _
.ServerOperation(True) _
.Read(Function(read) read.Action("Model_Read", "Event"))
End Sub).Render()
I hope you could help me on this.
Thank you and God bless...
Here's my code below:
Html.Kendo().Grid(Of SPIMS.ViewModel.EventViewModel.Index)() _
.Name("grid") _
.Columns(Sub(c)
c.Bound(Function(p) p.ID).HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"}).Width(10)
c.Bound(Function(p) p.CreatedDate).Format("{0:dd/MM/yyyy}").Width(20).Title("Date").HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"})
c.Bound(Function(p) p.Source).HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"}).Width(20)
c.Bound(Function(p) p.Message).HeaderHtmlAttributes(New With {.style = "text-align: center; font-weight: bold"}).Width(50).Title("Description")
c.Command(Sub(commands)
commands.Custom("View").Click("showDetails")
End Sub).Title(" ").Width(10)
End Sub) _
.Scrollable() _
.Sortable _
.Filterable() _
.Pageable(Sub(pager)
pager.Input(True)
pager.Numeric(True)
pager.Input(True)
pager.PreviousNext(True)
pager.Refresh(True)
pager.PageSizes(True)
pager.ButtonCount(10)
End Sub) _
.HtmlAttributes(New With {.style = "height:450px;width:900px;"}) _
.DataSource(Sub(d)
d.Ajax() _
.PageSize(10) _
.Model(Sub(model) model.Id(Function(p) p.ID)) _
.ServerOperation(True) _
.Read(Function(read) read.Action("Model_Read", "Event"))
End Sub).Render()