1

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?

tereško
  • 58,060
  • 25
  • 98
  • 150
lew
  • 77
  • 4
  • 11
  • Possible duplicate of [MVC 3 Webgrid make entire row clickable](http://stackoverflow.com/questions/10445690/mvc-3-webgrid-make-entire-row-clickable) – Syed Ali hassan Aug 29 '16 at 11:49

1 Answers1

0

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.

Mike Brind
  • 28,238
  • 6
  • 56
  • 88
  • A year on, has anybody posted an MVC adaptation of your article? – Codes with Hammer Apr 23 '14 at 13:43
  • @CodeswithHammer All you have to do is move the code that generates the data to the controller and pass in a model to the WebGrid contructor. The creation of the grid and the jQuery stay in the View. – Mike Brind Apr 23 '14 at 15:45