I use webgrid in my razor mode in MVC 3. The following shows what my webGrid looks like, I want the whole row to be clicked, as well as click-through values to the javascript method.
I can achieve a javascript method call across the text of all columns. I want the same thing to happen to click anywhere on the entire line.
I ask you to participate in this. Thanks
@grid.GetHtml( columns: grid.Columns( grid.Column("CompanyName", format: @<text><a href="javascript:SubmitValues('@item.Col1','@item.Col2','@item.Col3');">@item.CompanyName</a></text>, header: "ABC"), grid.Column("CompanyAddress", format: @<text><a href="javascript:SubmitValues('@item.Col1','@item.Col2','@item.Col3');">@item.CompanyName</a></text>, header: "DEF"), )) }
source share