MVC 3 Webgrid make entire row clickable

后端 未结 2 931
野的像风
野的像风 2021-01-05 14:23

I am using webgrid in my razor view in MVC 3. Below is how my webGrid looks, I want to make the entire row clickable and on click pass values to the javascript method also.

2条回答
  •  日久生厌
    2021-01-05 15:02

    I have done this in my project with adding a class style: "click_able" on specific column like.

    grid.Column("CompanyName", style: "click_able", format: @@item.CompanyName, header: "ABC"),
    

    and then add click function like.

    
    
                                     
                  
提交回复
热议问题