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

RadGrid with Merged Header

3 Answers 223 Views
Grid
This is a migrated thread and some comments may be shown as answers.
raaj
Top achievements
Rank 1
raaj asked on 22 Sep 2010, 04:17 AM
Team,

Am Binding DataTable as a Datasource for Radgrid.

My need is I want to merge the Radgrid Column Headers as shown in the table below....

pls. reply its urgent...I want to merge Odd or even Columns and have to apply formatting also...


2007 2007 2008 2008 2009 2009
Payroll Payroll Tax Payroll Payroll Tax Payroll Payroll Tax
0.831479219 0.878480961 0.125905661 0.582711154 0.666182555 0.003437293
0.692284719 0.924671836 0.348159038 0.16631018 0.125653848 0.547001853
0.248446244 0.528673182 0.677024774 0.018750403 0.355728003 0.748506612
0.355725838 0.025139254 0.640793399 0.779381424 0.291280161 0.590636076
0.503992823 0.423174681 0.581413565 0.524508673 0.036539204 0.976846173

Thanks.
India.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Sep 2010, 04:48 AM
Hello Rajesh,

Please check out the following documentation which shows how to customize column headers.
Customizing with GridTemplateColumn

Thanks,
Princy.
0
raaj
Top achievements
Rank 1
answered on 22 Sep 2010, 07:54 AM
Thanks Princy,

Problem is am not using ITemTemplate in my appln.

<

 

telerik:RadGrid ID="MainGrid2" AutoGenerateColumns= "true" runat="server" ShowHeader = "true"

 

 

GridLines="Both" Skin="Outlook" OnItemDataBound="MainGrid2_ItemDataBound" OnPreRender="AnswerGenMainGrid1_PreRender"

 

 

OnItemCreated = "MainGrid2_ItemCreated" OnColumnCreated = "MainGrid2_ColumnCreated">

 

 

<MasterTableView TableLayout="Auto" AllowCustomSorting="true" ></MasterTableView>

 

 

 

<ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="0" />

 

<%

--<Resizing AllowColumnResize="true"/>--%>

 

<%

--<Resizing ClipCellContentOnResize="false" AllowColumnResize="true" AllowRowResize="true" />--%>

 

<%

--<ClientEvents OnGridCreated="GridCreated" />--%>

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 



my code is above like that. Am just binding Datatable to Radgrid. In that scenario I want to get the look & feel as I sent u before.

Pls. reply.

Thanks
0
Pavlina
Telerik team
answered on 27 Sep 2010, 09:14 AM
Hi Rajesh,

The project in the code library below demonstrates how to span any given cell over a number of rows/columns, with autogenerated columns in the control.
http://www.telerik.com/community/code-library/aspnet-ajax/grid/span-cells-in-grid-over-multiple-positions.aspx

Give it a try and see if it works as expected.

Best wishes,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
raaj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
raaj
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or