Section headers in a Gridview?

J

jonefer

How can I add section headers in a Gridview... is this possible?

Otherwise, I will have to put 3 gridviews in a table, and i'm not certain
about how to control column width as if the grid was one piece:

This is what I'm trying so far...
'SecurityDisabled' is a class that just makes the element invisible - (so far)

<table class="SecurityDisabled" style="width: 530px">
<tr>
<td align="left" style="font-weight: bold;
font-size: x-small; width: 769px; color: black;
font-family: 'Century Gothic'">
Measure</td>
<td align="center" style="font-weight: bold;
font-size: x-small; width: 231px; color: black;
font-family: 'Century Gothic'">
Phys<br />
Total</td>
<td align="center" style="font-weight: bold;
font-size: x-small; width: 231px; color: black;
font-family: 'Century Gothic'">
Phys<br />
%</td>
<td align="center" style="font-weight: bold;
font-size: x-small; width: 231px; color: black;
font-family: 'Century Gothic'">
Spec<br />
Avg</td>
<td align="center" style="font-weight: bold;
font-size: x-small; width: 231px; color: black;
font-family: 'Century Gothic'">
Target</td>
</tr>
<tr>
<td colspan="5" style="font-weight: bold;
font-size: x-small; color: black; font-family: Century Gothic">
Coding Level Intensity</td>
</tr>
<tr>
<td colspan="5" style="font-weight: bold;
font-size: x-small; color: black; font-family: Century Gothic">
Outpatient New</td>
</tr>
<tr>
<td colspan="5" style="font-size: x-small;
color: black; font-family: Century Gothic">
<asp:GridView ID="gvResource_Detail_01"
runat="server" AutoGenerateColumns="False" BorderStyle="Solid"
GridLines="Horizontal" Style="font-size: x-small;
color: black; font-family: 'Century Gothic'"
Width="530px" OnRowDataBound="gvResource_Detail_RowDataBound">
<Columns>
<asp:BoundField
DataField="Measure" HeaderText="Measure" SortExpression="Measure">
<HeaderStyle
HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField
DataField="Count" HeaderText="Count" SortExpression="Count">
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField
HeaderText="%" SortExpression="%">
<EditItemTemplate>
<asp:TextBox
ID="TextBox1" runat="server" Text='<%# Bind("[%]") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1"
runat="server" Text='<%# Bind("[%]") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="Spec
Avg" HeaderText="Spec Avg" SortExpression="Spec Avg">
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField
HeaderText="Target" SortExpression="Target">
<EditItemTemplate>
<asp:TextBox
ID="TextBox2" runat="server" Text='<%# Bind("Target") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2"
runat="server" Text='<%# Bind("Target") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="5" style="font-weight: bold;
font-size: x-small; color: black; font-family: Century Gothic">
Outpatient Established</td>
</tr>
<tr>
<td colspan="5" style="font-size: x-small;
color: black; font-family: Century Gothic">
<asp:GridView ID="gvResource_Detail_02"
runat="server" AutoGenerateColumns="False" BorderStyle="Solid"
GridLines="Horizontal" Style="font-size: x-small;
color: black; font-family: 'Century Gothic'"
Width="530px" OnRowDataBound="gvResource_Detail_RowDataBound">
<Columns>
<asp:BoundField
DataField="Measure" HeaderText="Measure" SortExpression="Measure">
<HeaderStyle
HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField
DataField="Count" HeaderText="Count" SortExpression="Count">
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField
HeaderText="%" SortExpression="%">
<EditItemTemplate>
<asp:TextBox
ID="TextBox1" runat="server" Text='<%# Bind("[%]") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1"
runat="server" Text='<%# Bind("[%]") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="Spec
Avg" HeaderText="Spec Avg" SortExpression="Spec Avg">
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField
HeaderText="Target" SortExpression="Target">
<EditItemTemplate>
<asp:TextBox
ID="TextBox2" runat="server" Text='<%# Bind("Target") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2"
runat="server" Text='<%# Bind("Target") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="5" style="font-weight: bold;
font-size: x-small; color: black; font-family: Century Gothic">
Specialty Referrals</td>
</tr>
<tr>
<td colspan="5">
<asp:GridView ID="gvResource_Detail_03"
runat="server" AutoGenerateColumns="False" BorderStyle="Solid"
GridLines="Horizontal" Style="font-size: x-small;
color: black; font-family: 'Century Gothic'"
Width="530px" OnRowDataBound="gvResource_Detail_RowDataBound">
<Columns>
<asp:BoundField
DataField="Measure" HeaderText="Measure" SortExpression="Measure">
<HeaderStyle
HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField
DataField="Count" HeaderText="Count" SortExpression="Count">
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField
HeaderText="%" SortExpression="%">
<EditItemTemplate>
<asp:TextBox
ID="TextBox1" runat="server" Text='<%# Bind("[%]") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1"
runat="server" Text='<%# Bind("[%]") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="Spec
Avg" HeaderText="Spec Avg" SortExpression="Spec Avg">
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField
HeaderText="Target" SortExpression="Target">
<EditItemTemplate>
<asp:TextBox
ID="TextBox2" runat="server" Text='<%# Bind("Target") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2"
runat="server" Text='<%# Bind("Target") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle
HorizontalAlign="Center" />
<ItemStyle
HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top