Im我的应用程序使用Syncfusion控件的ASP.NET MVC 5 im。如何从Syncfusion MVC Grid的选定行中获取列值
这是我的观点:
@using Reporter.Models
@model List<UsersListViewModel>
@(Html.EJ().Grid<object>("FlatGrid")
.Datasource(Model)
.AllowFiltering()
.FilterSettings(d => d.FilterType(FilterType.Menu))
.AllowSorting()
.ToolbarSettings(toolBar => toolBar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.ExcelExport);
}))
.Columns(col =>
{
col.Field("OrderNumber").HeaderText("Lp.").TextAlign(TextAlign.Left).Width(15).AllowFiltering(false).Add();
col.Field("UserName").HeaderText("Nazwa użytkownika").Width(50).Add();
col.Field("CanReadReports").HeaderText("Dostęp do raportów").Width(40).AllowSorting(false).HeaderTextAlign(TextAlign.Center).Add();
col.Field("IsAdministrator").HeaderText("Administrator").Width(40).AllowSorting(false).Add();
})
.Mappers(map => map.ExportToExcelAction("Account/UserListExportToExcel"))
.AllowSelection()
.SelectionType(SelectionType.Single)
)
<hr/>
<p style="text-align: justify">
@Html.ActionLink("Nowy użytkownik", "Register", "Account",
null,
new { @class = "btn btn-default" }
)
@Html.ActionLink("Usuń użytkownika", "Register", "Account",
new {user = "UserNameToRaplace"}, //here i want UserName from selected row
new { @class = "btn btn-default" }
)
@Html.ActionLink("Zmień hasło", "Manage", "Account",
new { user = "UserNameToRaplace"},
new { @class = "btn btn-default" }
)
</p>
而且我的问题是如何从所选行获取用户名和粘贴ActionLink的。