Adding button to group header

1 posts, 0 answers
  1. Avi
    Avi avatar
    25 posts
    Member since:
    Oct 2010

    Posted 03 May 2012 Link to this post


    I created a Group:

    <telerik:RadGridView Grid.Row="4" Grid.Column="1" Margin="0,5" ItemsSource="{Binding MatchedReferences}">
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="60"/>
                    <TextBlock Foreground="#1044AD" Text="{Binding Group.Key}"/>
                    <telerik:RadButton Grid.Column="1" x:Name="DeleteButton2" Height="20"
                    Command="{Binding DeleteMatchCommand}"
                    Content="{Binding AppStrings.Delete, Source={StaticResource StringsLocator}}">
            <telerik:GridViewDataColumn DataMemberBinding="{Binding MatchId}" IsVisible="False"/>                                                    
            <telerik:GroupDescriptor Member="MatchId" />

    public RelayCommand<string> DeleteMatchCommand { get; protected set; }
    DeleteMatchCommand = new RelayCommand<string>((matchId) => ExecuteDelete(matchId));
    private void ExecuteDelete(string matchId)

    But the problem is that by clicking the "delete" button the ExecuteDelete event has NOT been fired. When I put the "delete" button outside of GroupHeaderTemplateand and click in at runtime  there's no problem. the event is fired and the  ExecuteDelete method is executed. Why is this?

    With regards
Back to Top