Add button to GroupHeader

4 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Sep 2011

    Posted 11 Sep 2011 Link to this post

    I need to add a button to the GroupHeader that will pass through the ID of the Resource pressed to the event. 
    I have added a button with :

     

    <local:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>

     <DataTemplate>

     <Border Width="160" Margin="5,0">  

     <StackPanel Orientation="Vertical">

     <TextBlock Foreground="{StaticResource GroupHeaderForeground}" FontSize="12" Text="{Binding Name.DisplayName}" TextWrapping="Wrap" />

     <Button Content="Details" Height="23" Name="SummaryPopupCommand" Width="75" Command="{Binding Path=SummaryPopupCommand, Source={StaticResource ViewModel}}" />

     </StackPanel>

     </Border>

     </DataTemplate>

     </local:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>

    First of all the button is always disabled and I don't know how to attach the event or pass the ID,  can someone please help?

     

  2. Yana
    Admin
    Yana avatar
    4709 posts

    Posted 12 Sep 2011 Link to this post

    Hello David,

    The problem with the disabled button is a known issue and is already fixed in the internal builds. Could you please download the latest internal build from your account and give it a try?

    All the best,
    Yana
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. David
    David avatar
    3 posts
    Member since:
    Sep 2011

    Posted 13 Sep 2011 Link to this post

    I downloaded the latest version and it still would not work, the button is always disabled, I changed the button "as below" but it will not work.

    <

    telerik:RadButton Content="Details" Height="23" Name="SummaryPopupCommand" Width="75" Command="{Binding Path=SummaryPopupCommand, Source={StaticResource ViewModel}}" />

     
    in my MV I have RelayCommand is from ICommand
    public RelayCommand SummaryPopupCommand { get; private set; }

    ......
    SummaryPopupCommand = new RelayCommand(DisplaySummaryPopupCommand);

     SummaryPopupCommand.IsEnabled = true;

     .......

    private void DisplaySummaryPopupCommand()

     {....}

    Any idea what could be causing it?

  4. Yana
    Admin
    Yana avatar
    4709 posts

    Posted 15 Sep 2011 Link to this post

    Hello David,

    Have you tried with the internal build ( version 2011.2.912)?  I've checked again and the issue is fixed, you can find attached a simple example demonstrating the approach.

    Hope this helps.

    Regards,
    Yana
    the Telerik team

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

Back to Top