This is a migrated thread and some comments may be shown as answers.

Repeat Column Header

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kate
Top achievements
Rank 1
kate asked on 06 Feb 2009, 09:24 AM
HI,
I am wondering if I can repeat the column Header in the case of multiple results. e.g.
in a grid that contains results for multiple hotels, could the column headers (e.g. rooms, price etc) be repeated per hotel?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Feb 2009, 10:30 AM
Hi Kate,

One suggestion is by adding single GridTemplateColumn and add a table structure as ItemTemplate. Then you can bind the values to the labels to show in the grid and format according to your need.

Here is the ASPX of GridTemplateColumn which I tried:

<telerik:GridTemplateColumn> 
<ItemTemplate> 
<table width="250" border="1" frame="border">  
    <tr> 
        <td> 
            <b><asp:Label Text="EmployeeID" runat="server"></asp:Label></b>  
        </td> 
        <td> 
            <b><asp:Label Text="LastName" runat="server"></asp:Label> </b> 
        </td> 
    </tr> 
    <tr> 
        <td> 
            <%# Eval("EmployeeID")%> 
        </td> 
        <td> 
            <%# Eval("LastName")%> 
        </td> 
    </tr> 
</table> 
</ItemTemplate> 
</telerik:GridTemplateColumn> 

Thanks,
Princy.
Tags
Grid
Asked by
kate
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or