- You have to change the Column into TemplateField
How to alter the style of the Row and Column:
- At first make the header row in Multi line as well One simplest example:
- <HeaderTemplate>Line1<br />Line2</HeaderTemplate>
- Then in order the change the column field width set it inside <ItemTemplate> tag
HTML:
<asp:TemplateField HeaderText="AdmissionNumber"
SortExpression="AdmissionNumber">
<HeaderTemplate>Admission <br /> Number</HeaderTemplate>
<HeaderTemplate>Admission <br /> Number</HeaderTemplate>
<EditItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Eval("AdmissionNumber") %>'
></asp:Label>
></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("AdmissionNumber") %>'
Width="30px"
Height="19px"
BackColor="#FFCCFF"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
No comments:
Post a Comment