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

Add button to GroupHeader

3 Answers 48 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Sep 2011, 01:17 AM
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?

 

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Sep 2011, 08:38 AM
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 >>

0
David
Top achievements
Rank 1
answered on 13 Sep 2011, 06:33 AM
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?

0
Yana
Telerik team
answered on 15 Sep 2011, 02:02 PM
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 >>

Tags
ScheduleView
Asked by
David
Top achievements
Rank 1
Answers by
Yana
Telerik team
David
Top achievements
Rank 1
Share this question
or