Question

I have a view with telerik grid.

Ihave a controler code which I am passing the data to the view

public ActionResult GridList(int id)
        {
             _genrepo.GetCategoriesForControlPlanTemplateByControlPlanID(CurrentHealthPlanId,id);

            return PartialView(_viewModel);
        }

Hunter: here is my grid

<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(o => o.OrderID).Width(100);
            columns.Bound(o => o.ContactName).Width(200);
            columns.Bound(o => o.ShipAddress);
            columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120);
        })
        .DataBinding(dataBinding => 
        {
            dataBinding.Server().Select("FirstLook", "Grid", new { ajax =
                ViewData["ajax"] });
            dataBinding.Ajax().Select("_FirstLook",
                "Grid").Enabled((bool)ViewData["ajax"]);
        })
        .Scrollable(scrolling => scrolling.Enabled((bool)ViewData["scrolling"]))
        .Sortable(sorting => sorting.Enabled((bool)ViewData["sorting"]))
        .Pageable(paging => paging.Enabled((bool)ViewData["paging"]))
        .Filterable(filtering => filtering.Enabled((bool)ViewData["filtering"]))
        .Groupable(grouping => grouping.Enabled((bool)ViewData["grouping"]))
        .Footer((bool)ViewData["showFooter"])
%>

I am able to display the data perfectly in to the grdi with pagging.. but problem is when I hit the second page.. the whole grid showing me in a static page. I am not able to see the grid.. I hope its a partial view problem.. I am not able to implement pagging sorting and filtering on partial view page?

can any body help me out how to avoid this situation to work on partial views?

thanks in advance

Was it helpful?

Solution

There's an example illustrating how to implement paging with the Telerik Grid component for ASP.NET MVC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top