Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将 gridview 列显示为必填字段(使用星号),即
部分列 1 部分列 2*
我的问题是如何使列名和星号符号用两种不同的字体
表示 SomeColumn2 是蓝色, * 是红色
如果你已经使用 TemplateField 绑定了 GridView,你可以像这样在每一列上设置 HeaderStyle。
<HeaderStyle BackColor="Blue" />
以相同的方式将红色应用于另一列。如果您想更改课程本身,请尝试。
<HeaderStyle CssClass="myclass" />