I tried:
@Html.Grid(Model.PagedList).Columns(column =>{
column.For(m => m.Name).Attributes(@class => "test");
})
But that just added it to the tag inside the grid.
I tried:
@Html.Grid(Model.PagedList).Columns(column =>{
column.For(m => m.Name).Attributes(@class => "test");
})
But that just added it to the tag inside the grid.
You could use HeaderAttributes
:
column
.For(m => m.Name)
.Attributes(@class => "test")
.HeaderAttributes(@class => "someheaderclass");
While your solution is more suitable in this context, you could use more general approach with jQuery adding this line somewhere in JavaScript code below:
$('th').addClass("test");