0
我想在彈出窗口中點擊鏈接時打開kendo網格。 Kendo網格完全打開彈出窗口,但過濾和排序功能不起作用。我正在使用服務器端操作。當我在DatasourceRequest中對控制器端的特定列進行排序時,我始終將值作爲空值。Kendo網格過濾和排序功能在網格彈出時不起作用
任何幫助,高度讚賞..
<div class="panel-body" id="countryImageData">
@(Html.Kendo().Grid(Model.GlobalInventoryImages)
.Name("InventoryCountryImageDetailsGrid")
.Columns(columns =>
{
columns.Bound(p => p.SmartInventoryID).Hidden().Title("SPC#").HtmlAttributes(new { @id = "CountrySmartInventory_Grid" });
columns.Bound(p => p.SubwayProductCode).Width(50).Title("SPC#").HtmlAttributes(new { @id = "CountrySubwayProductCode_Grid" });
columns.Bound(p => p.GlobalCaseImageName).Width(100).Title("Case Images").HtmlAttributes(new { @id = "GlobalCaseGraphicName_Grid" }).ClientTemplate(" <a href=\"javascript:void(0);\" class=\"btn-openpdf\" onClick = \"getGlobalImage(this,false,true,true);\">#=GlobalCaseImageName#</a> ");
columns.Bound(p => p.GlobalInnerImageName).Width(100).Title("Inner Images ").HtmlAttributes(new { @id = "GlobalInnerImageName_Grid" }).ClientTemplate(" <a href=\"javascript:void(0);\" class=\"btn-openpdf\" onClick = \"getGlobalImage(this,false,false,true);\">#=GlobalInnerImageName#</a> ");
columns.Bound(p => p.CountryNames).Width(100).Title("Country").HtmlAttributes(new { @id = "CountryNames_Grid" });
})
.Pageable(pager => pager.PageSizes(new int[] { 25, 50, 75, 100 }).Input(true))
.Sortable(e => e.AllowUnsort(true).SortMode(GridSortMode.MultipleColumn))
.Scrollable()
.ColumnMenu()
.NoRecords("No Records")
.Selectable(e => e.Mode(GridSelectionMode.Multiple))
.Filterable()
.ColumnResizeHandleWidth(10)
.ColumnResizeHandleWidth(10)
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
.HtmlAttributes(new { @class = "custom-kendo-grid custom-kendo-grid-inv" })
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(true)
.PageSize(25)
.Read(read => read.Action("InventoryImage_Read", "Inventory").Data("function onCountryAdditonalData(){ return {subwayProductCode: $('#SubwayProductCode').val()};}"))
)
)
</div>
也許你可以顯示一些代碼? –
@RaniRadcliff代碼added.please見上面 – Dnyaneshwar123456