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

How to refresh mvc wrapper grid?

1 Answer 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Behrad
Top achievements
Rank 1
Behrad asked on 17 Sep 2012, 05:48 AM
I have defined a grid like this:
@(Html.Kendo().Grid(Model)
             .Name("OnlineVisitors")
             .Columns(c =>
                {                  
                    c.Bound(p => p.DurationInMinute).Title("duration");
                    c.Bound(p => p.PersianStartDate).Title("start time");
                    c.Bound(p => p.IP).Title("IP Address");
                })
             .DataSource(datasource =>
                 datasource.Ajax()
                           .Read(read => read.Action("JsonList", "OnlineVisitors", routeKeyValues))
             )
)
And now i want to refresh the grid in JavaScript code,after an Ajax call to server,that do something with data source i'm using.any help will be appreciated.

1 Answer, 1 is accepted

Sort by
0
Accepted
Herbert
Top achievements
Rank 1
answered on 18 Sep 2012, 02:08 PM
try:
$('#OnlineVisitors').data('kendoGrid').dataSource.page(1);
$('#OnlineVisitors').data('kendoGrid').dataSource.read();
Tags
Grid
Asked by
Behrad
Top achievements
Rank 1
Answers by
Herbert
Top achievements
Rank 1
Share this question
or