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

Add html conetnt in header template

2 Answers 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sreedhar
Top achievements
Rank 1
Sreedhar asked on 19 Jul 2011, 08:40 AM
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowPaging="True"
                        OnNeedDataSource="RadGrid1_NeedDataSource" OnPreRender="RadGrid1_PreRender" OnItemCommand="RadGrid1_ItemCommand"
                        OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ReportItemCreated">
                        <MasterTableView CommandItemDisplay="Top">
                            <Columns>
                                <telerik:GridTemplateColumn>
                                    <HeaderTemplate>
 
<tr class="subHeader" runat="server" id="headerTr">
<!-- I want to add html tags here from C# code behind -->
</tr>
                    </HeaderTemplate>
                                    <ItemTemplate>

Sample HTML that I want to add there is 
<th class="subHeader rgHeader">
                                                Test
                                            </th>
                                            <th class="subHeader rgHeader">
                                            </th>
                                            <th class="subHeader rgHeader">
                                                Test
                                            </th>

I also want to add HTML <ItemTemplate>

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Jul 2011, 09:28 AM
Hello Sreedhar,

You can try the same approach in the following help documentation.
Customizing with GridTemplateColumn.

Thanks,
Princy
0
Sreedhar
Top achievements
Rank 1
answered on 19 Jul 2011, 09:30 AM
I don't want to fill entire grid with data I have customized the data in objects and I want to add other empty tags for expand collapse functionality. So, I wanted to customize templates
Tags
Grid
Asked by
Sreedhar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Sreedhar
Top achievements
Rank 1
Share this question
or