1
現在我正在使用MVC webgrid。我需要根據需求設置列寬。MVC webgrid列寬?
網:
@{
var grid = new WebGrid(source: Model.TenantList, rowsPerPage: 11, canPage: true, canSort: false);
@grid.Table(
headerStyle: "headerStyle",
tableStyle: "table table-responsive fixed-column fixed-column table-striped table-hover a-grid",
alternatingRowStyle: "alternateStyle",
htmlAttributes: new { id = "tenantgrid" },
columns: grid.Columns(
grid.Column("Action", style: "labelcolumn cchk",format:@<text><input class="checkbox cchk" id="assignChkBx" name="assignChkBx" value="@item.Person_Code" type="checkbox" onClick="assignChkBx()" /></text>),
grid.Column("TitleName"),
grid.Column("FullName",style: "name-width"),
grid.Column("Employee_Number"),
grid.Column("Fathername"),
grid.Column("Address"),
grid.Column("EMAILID")
)
)
}
的CSS:
.name-width {
width:500px;
}
問題是類被稱爲像這樣
<td class="name-width">AMEER ABOOBACKER</td>
但它不是我的應用網格。我找不到這個錯誤。朋友給我解決方案........ 感謝提前。