这里我们想要设施名称(数据)的Bold字体,我似乎无法在任何地方添加FONT。
<Columns>
<dx:GridViewDataTextColumn FieldName="FACILITY_ID" Visible="false">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="Name" Caption="Facility Name" VisibleIndex="1">
<CellStyle HorizontalAlign="Left"></CellStyle>
<HeaderStyle HorizontalAlign="Center" />
<HeaderTemplate>
<div style="text-align: left; vertical-align: middle; float: left;">
<div style="float: left;">
<dx:ASPxImage runat="server" ID="imgFilter" ToolTip="Show/hide grid filter" ImageUrl="~/Content/Images/GridFilterButton.png">
<ClientSideEvents Click="ImageClick" />
</dx:ASPxImage>
</div>
<div style="float: left; padding-left: 10px; padding-top: 4px;">
Facility
</div>
</div>
</HeaderTemplate>
答案 0 :(得分:2)
为class="FacilityName"
设置DataItemTemplate
并为其应用样式
<dx:GridViewDataTextColumn FieldName="Name" Caption="Facility Name" VisibleIndex="1">
<DataItemTemplate>
<span class="FacilityName"><%# Container.Text %></span>
</DataItemTemplate>
</<dx:GridViewDataTextColumn>
<强> CSS 强>
.FacilityName
{
font-weight:bold;
}