我使用ASP.NET MVC architecture.I有一個按鈕,點擊一個Telerik的窗口,它的工作原理罰款。代碼如下 -我們可以在Telerik Modal窗口中有一個網格嗎?
<% Html.Telerik().Window()
.Name("Search")
.Visible(false)
.Title("Select Users")
.Content(() => {%>
<% using (Html.BeginForm("GetUsers", "Administration", FormMethod.Post,
new{id ="users-form"}))
{%>
<p class="note">Mention the Users name to display information</p>
<label for="username">Name:</label>
<%= Html.TextBox("username") %>
<div class="form-actions">
<button type="button" class="bUsername">Search</button>
</div>
<% } %>
<%})
.Width(400)
.Modal(true)
.Render();%>
但是當我嘗試添加里面的內容Telerik的網格Telerik的窗口的它給了我error..code如下
<%= 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"])
%>
錯誤:。內容(()=> {%> ----代表System.Func不帶參數0
所以想。問我們可以有模態窗口內的網格,如果是的話如何實現nt它,如果我們不能比最新的選擇呢?