MVC WebGrid,行选择 [英] MVC WebGrid, row select

查看:62
本文介绍了MVC WebGrid,行选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有带有以下项的简单WebGrid:

I have simple WebGrid with item:

  grid.Column(format: (item) => @Ajax.ActionLink("Select", "LoadForEdit", "Receipt", new { Id = Model.Services.IndexOf(@item.Value) }, new AjaxOptions { UpdateTargetId = "ItemToEdit" }))

我想在实际单击行时进行选择,而不仅仅是在该行中的选择"项上进行选择.是否可以?

And i want to select when actually clicking on row, not only on 'select' item in that row. Is it possible?

推荐答案

我写了一篇有关使Razor Web Pages的WebGrid行可单击"的文章(

I wrote an article on making WebGrid rows "clickable" for Razor Web Pages (http://www.mikesdotnetting.com/Article/178/How-To-Make-A-WebGrid-Row-Clickable) using jQuery. You can adapt the code to MVC very easily.

这篇关于MVC WebGrid,行选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆