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

GroupFooterTemplate get group key

1 Answer 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
burning
Top achievements
Rank 1
burning asked on 16 Dec 2015, 12:36 PM

 I have template:

 <telerik:GridViewDataColumn.GroupFooterTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Vertical" Margin="0,10">
                                        <TextBlock Margin="0,0,0,2"> 
                                            <Hyperlink Command="{Binding SellingCatalog.DailyTotalCommand, Source={StaticResource Locator}}"  CommandParameter="{Binding Key}" >
                                               Daily Total
                                                </Hyperlink>
                                        </TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </telerik:GridViewDataColumn.GroupFooterTemplate>

 

How can I send group key to CommandParameter
Like that: CommandParameter="{Binding Key}" 

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 21 Dec 2015, 09:09 AM
Hi Viachaslau,

Can you please test the approach from the following code snippet:

<
Hyperlink Command="{Binding SellingCatalog.DailyTotalCommand, Source={StaticResource Locator}}" 
        CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewGroupRow}}, Path=Group.Key}">Daily Total</Hyperlink>

Please, update me if this was helpful. Otherwise, would it be possible to share some more details on your setup and what exactly you are trying to achieve with the group key?

Regards,
Stefan Nenchev
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
burning
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or