WebGrid (Razor)
How can the headers alignment be set?
I need to be able to change the alignment for each column (could be different)
It seems to be a all or nothing deal nor does it seem to take the alignment of the child TD.
WebGrid (Razor)
How can the headers alignment be set?
I need to be able to change the alignment for each column (could be different)
It seems to be a all or nothing deal nor does it seem to take the alignment of the child TD.
There currently is not a way to set a different style for each column header using the WebGrid in MVC 3. You can however use the tableStyle property to set the style for all column headers.
.header { text-align: left; }
@var grid = new WebGrid(Model);
@grid.GetHtml(headerStyle: "header")