MVC WebGrid, row select

匆匆过客 提交于 2019-12-13 17:17:03

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/15225281/mvc-webgrid-row-select

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!