MVC3的WebGrid头对齐 [英] MVC3 WebGrid header alignment
问题描述
的WebGrid(剃刀)
WebGrid (Razor)
如何能在头对齐设置?
我需要能够改变各列的比对(可能是不同的)
I need to be able to change the alignment for each column (could be different)
这似乎是一个全有或全无的交易,也不似乎带着孩子TD的对齐方式。
It seems to be a all or nothing deal nor does it seem to take the alignment of the child TD.
推荐答案
有目前没有设置使用的WebGrid每个列标题中的MVC 3,但是,您可以使用TABLESTYLE属性来设置风格不同的风格的一种方式所有的列标题。
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 {
文本对齐:左;
}
.header { text-align: left; }
@var电网=新的WebGrid(模型);
@var grid = new WebGrid(Model);
@ grid.GetHtml(headerStyle:头)
@grid.GetHtml(headerStyle: "header")
这篇关于MVC3的WebGrid头对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!