Posted 19 August 2019, 2:31 pm EST - Updated 29 September 2022, 10:51 am EST
So, I’ve attempted to apply CSS formatting to the rows on a flexgrid.
My CSS looks like this (it’s stupid formatting only to try and see if it works):
.grid {
background-color: green;
}
.grid .wj-row
{
background-color: blue;
height: 150px;
}
.wj-cells .wj-cell {
background-color: yellow ;
height: 150px;
padding: 10px;
}
.grid .wj-row .wj-cell {
background: pink;
text-align: center !important;
height: 150px;
}
Most of that formatting applies, but the row height is always overridden by the inline styling (image attached).
The flexgrid setup looks like this:
@(Html.C1().FlexGrid(Of OrderDetail)() _
.Id("flexGrid") _
.AutoGenerateColumns(False) _
.Bind(Function(ib) ib.Bind(Model.Details).NewItemCreator("SetDefault").Update(Url.Action("GridUpdate", "Order")).Create(Url.Action("GridCreate", "Order")).Delete(Url.Action("GridDelete"))) _
.IsReadOnly(False) _
.CssClass("grid") _
.AllowDelete(True) _
.AllowAddNew(True).ItemFormatter("SVGFormatter") _
.Columns(Sub(bl)
bl.Add(Sub(cb) cb.Binding("OrderID").Header("OrderID").Width("1.5*").IsReadOnly(True))
bl.Add(Sub(cb) cb.Binding("Picture").Header("Picture").Width("1.5*").IsReadOnly(True))
bl.Add(Sub(cb) cb.Binding("Series").Header("Series").Width("1.5*").Name("Series"))
bl.Add(Sub(cb) cb.Binding("ColorID").Header("ColorID").Width("1.5*").Name("ColorID"))
bl.Add(Sub(cb) cb.Binding("Quantity").Header("Quantity").Width(".5*").Name("Quantity"))
bl.Add(Sub(cb) cb.Binding("Width").Header("Width").Width(".5*").Name("Width"))
bl.Add(Sub(cb) cb.Binding("Height").Header("Height").Width(".5*").Name("Height"))
bl.Add(Sub(cb) cb.Binding("MatchingBack").Header("MatchingBack").Width("*").Name("MatchingBack"))
bl.Add(Sub(cb) cb.Binding("Hinges").Header("Hinges").Width("*").Name("Hinges"))
bl.Add(Sub(cb) cb.Binding("Fingerpull").Header("Fingerpull").Width("*").Name("Fingerpull"))
bl.Add(Sub(cb) cb.Binding("SquareEdge").Header("SquareEdge").Width("*").Name("SquareEdge"))
bl.Add(Sub(cb) cb.Binding("SqFt").Header("SqFt").Width("*").IsReadOnly(True))
bl.Add(Sub(cb) cb.Binding("TotalPrice").Header("Total").Width("*").IsReadOnly(True))
End Sub)
)