Your grid has to implement AJAX binding. Look at http://demos.telerik.com/aspnet-mvc/razor/grid/ajaxbinding?theme=vista.
How can i do sort filter operation on my telerik mvc grid in a partial pop up window not other page?
-
30-06-2022 - |
题
I have MVC project. In this project i used Telerik window as popup and for content of the window i used Telerik MVC grid. When i run the program i see popup and grid inside it but when i clicked in a sort or filter.
It opens another page and show the grid on it. My problem is how can i render grid for sorting and filtering in a popup page that's partial view?
This is code of my window popup:
div class="t-rtl">
@{ Html.Telerik().Window()
.Name("PersonelList")
.Title("جستجوی کاربران")
.Content(@<text>@Html.Action("PersonelGridPopup", "Shared")</text>)
.Width(500)
.Height(300)
.Scrollable(true)
.Draggable(true)
.Visible(false)
.Render();
}
</div>
and this is code of my partialview for grid
@(Html.Telerik().Grid(Model)
.Name("PersonelGrid")
.Columns(columns =>
{
columns.Bound(o => o.PersonnelNumber).Width(150).Title("کد پرسنلی").Template(@<text><div><a class="popup" onclick="SendValue(this.innerHTML)">@item.PersonnelNumber</a></div></text>);
columns.Bound(o => o.Name).Width(100).Title("نام");
columns.Bound(o => o.Family).Title("نام خانوادگی");
columns.Bound(o => o.OrgPosition1.Title).Title("سمت سازمانی");
})
.Sortable()
.Filterable()
.Localizable("fa-IR")
.Footer(false)
)
@{ Html.Telerik().ScriptRegistrar().Globalization(true); }
解决方案
不隶属于 StackOverflow