mvc4 ajax grid,mvc4中用上一种grid
view 視圖@modelIEnumerable@using(Html.Configurator("The grid should...").PostTo("FirstLook","Grid").Begin()){
- @Html.CheckBox("ajax",true,"make AJAX requests")
- @Html.CheckBox("grouping",true,"allow grouping of data")
- @Html.CheckBox("filtering",true,"allow filtering of data")
- @Html.CheckBox("paging",true,"have pages with 10 items")
- @Html.CheckBox("scrolling",true,"show a scrollbar when there are many items")
- @Html.CheckBox("sorting",true,"allow sorting of data")
- @Html.CheckBox("showFooter",true,"show footer")
Apply}@(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"]))
總結(jié)
以上是生活随笔為你收集整理的mvc4 ajax grid,mvc4中用上一种grid的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 求一个qq网名闺蜜英文
- 下一篇: 绝味鸭脖真正的产地是哪里?