开发者

How to Navigate to a view spacifying the view name and controller when i click a row in mvc3 webgrid?

开发者 https://www.devze.com 2023-03-12 04:58 出处:网络
<div style=\"text-align:center\" class=\"grid\"> @{ var grid = new WebGrid(Model.SearchResults, canPage: true, rowsPerPage: 15);
<div style="text-align:center" class="grid">
@{
var grid = new WebGrid(Model.SearchResults, canPage: true, rowsPerPage: 15);
grid.Pager(WebGridPagerModes.NextPrevious);
@grid.GetHtml(headerStyle: "webgrid-header", footerStyle: "webgrid-footer",      selectedRowStyle: "webgrid-selected-row", alternatingRowStyle: "webgrid-alternating-row", rowStyle: "webgrid-row-style",
columns: grid.Columns(
    grid.Column(header: "Customer Name", style: "text-align-center", format: (item) =>开发者_StackOverflow社区 Html.ActionLink((string)item.FullName, "ShowContracts", new { id = item.UserId }, new { @style = "color: 'black'", @onmouseover = "this.style.color='green'", @onmouseout = "this.style.color='black'" })),
grid.Column(header: "SSN", style: "text-align-center", format: item => item.SSN)
))
}
</div>

For now I am clicking an item in a row and navigatin to a different page, but i want to click on a row to navigate. Thanks for any help.

0

精彩评论

暂无评论...
验证码 换一张
取 消