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

GridView GroupedRow doesn't line up & GroupRow edit

5 Answers 109 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dirk Liebich
Top achievements
Rank 1
Dirk Liebich asked on 31 Oct 2011, 11:33 PM
I was wondering if someone had a solution to get the Grouped Row headers to line up with the rest of the data.  Someone posted a similar topic on the Silverlight forum:  http://www.telerik.com/community/forums/silverlight/gridview/aggregate-result-display.aspx  but the example project doesn't work for me in WPF, even with a little massaging.

Also, I was wondering if the GroupedRow header values (The aggregate values) could be editable?

Thanks

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 01 Nov 2011, 07:08 AM
Hi Dirk Liebich,

I am sending you the same project, but targeting WPF. I hope it helps.
 

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Dirk Liebich
Top achievements
Rank 1
answered on 01 Nov 2011, 08:31 AM
Thanks, this is what I was looking for, and I really appreciate you getting back to me so quickly.

 I am having a little bit of difficulty porting it to my main solution (Which has many, many columns).  Does this solution work for very large, dynamically generated tables?  

Also, for my second question, I templated the GridViewRowFooterCell like this:

<ControlTemplate x:Key="GroupFooterCellTemplate">
            <TextBox Text="{Binding Value, Mode=OneWay}"/>
        </ControlTemplate>
        <Style TargetType="telerik:GridViewGroupFooterCell">
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Template" Value="{StaticResource GroupFooterCellTemplate}"/>
        </Style>

And it allows me to edit the Aggregated Cell, which is what I wanted, but unfortunately I lose the Values of the Cells that aren't aggregates.  Basically in my example, I have Two name columns, and then 6 Integer columns.  I group by the names, and aggregate the integers.  After applying my style, I lose the names.  Do you think I might be able to find a work around for this?

Thanks again for your quick reply.
0
Pavel Pavlov
Telerik team
answered on 04 Nov 2011, 01:39 PM
Hello Dirk Liebich,

On your questions :
The solution provided should be scalable to larger scenarios. In case you still have troubles adjusting it to your production project - please let me know what the troubles are and I will be glad to assist.

On your second question - What do you mean by "I lose the names"  ?

Best wishes,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Marc-Andre
Top achievements
Rank 1
answered on 02 May 2012, 05:30 AM
Hi Maya,

Your solution can be slightly improved by making the Group names in the header clickable in both Collapsed and Expanded states. You achieve this with the following code :
...
<Border x:Name="Content" Grid.ColumnSpan="3" Grid.Column="0" Grid.Row="1" IsHitTestVisible="False">
...
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="True">
...
<Setter Property="IsHitTestVisible" TargetName="Content" Value="True" />
...

Also, any ideas on how the get back that nice animation on the Expander when the state changes?

Thanks for your help,

MarcAndré Gosset
0
Maya
Telerik team
answered on 03 May 2012, 04:33 PM
Hi Marc-Andre,

Thank you for sharing your implementation with the community.
As for the animation, could you provide a bit more information about the one that you require ? 

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Dirk Liebich
Top achievements
Rank 1
Answers by
Maya
Telerik team
Dirk Liebich
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Marc-Andre
Top achievements
Rank 1
Share this question
or