2010-12-02 56 views
0

我有一个使用telerik网格的视图。使用asp.net使用Telerik Grid的部分视图问题mvc

IHAVE其中我将数据传递到视图

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

      return PartialView(_viewModel); 
     } 

猎人一个控制器上的代码:这里是我的网

<%= 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"]) 
%> 

我能够与完美显示数据的GRDI pagging .. 但问题是当我打第二页..整个网格显示我在一个静态页面。我无法看到网格..我希望它的局部视图问题..我无法在部分视图页面上实现分页排序和过滤?

任何机构可以帮助我如何避免这种情况在部分视图上工作?

在此先感谢

+0

你的网格初始值设定项是什么样的? – hunter 2010-12-02 18:06:24

回答

1

有一个example说明如何实现与Telerik的网格组件,用于ASP.NET MVC分页。

+2

感谢达林,我看到任何关于局部视图问题的例子?甚至在部分视图中我的网格排序和paggig不工作,这是我的问题.. – kumar 2010-12-02 18:11:49