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

[Solved] How to display blank for non-grouped headers

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rohit Dehar
Top achievements
Rank 1
Rohit Dehar asked on 10 Dec 2009, 04:35 PM

Hello:

 

We have a RadGrid which is populated dynamically, it has 9 columns. The grid is grouped on 1 column using GroupByExpressions/GridGroupByField.

The header of the grid is actually supposed to display that grouped column, plus sum of 2 other columns with that group. Here is the relevant portion of the code:

<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="GBF" />
<telerik:GridGroupByField FieldName="S1" Aggregate="Sum" HeaderText=".."/>
<telerik:GridGroupByField FieldName="S2" Aggregate="Sum" HeaderText=".." />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="GBF" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>

Now the problem is, these grouped columns are not aligned to their respective top-level headers. Everything appears in a single line (in html output, I see colspan=9).

Is there a way to align GroupBy headers to top-level headers and display blanks in other places.

Thanks in advance .. Rohit Dehar

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 14 Dec 2009, 02:54 PM
Hello Rohit,

Please check this online demo to see the grouped columns are displayed in the grid GroupPanel by design and check if you observe the same behavior in your application. 
Additionally, I am afraid that displaying the grouped column headers in the GroupPanel above the corresponding column headers in the grid HeaderItem could be hardly achieved. Therefore I suggest that you try setting the grid ShowGroupPanel property to false and see if this works for you. 


Kind regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Rohit Dehar
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or