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

HyperLink in Totals?

1 Answer 57 Views
This is a migrated thread and some comments may be shown as answers.
Terry Newton
Top achievements
Rank 1
Terry Newton asked on 29 Mar 2011, 10:37 PM
I have a grid that I have used a CellTemplate and a datatemplate with a HyperlinkButton whose content is bound to the property for the column to accomplish a hot link to impliment a drill down from the Grid.  So far so good, but when I go to accomplish the same using the totals row I do not seem to be able to template it in order to control the content.

How can I turn my total row into something I can handle a click event on?

Any suggestions?

Some code is shown below as reference, but not all, for clarity














HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}"





FooterCellStyle="{StaticResource GridViewFooter_CellStyle}"




DataMemberBinding="{Binding Scheduled}">










<TextBlock Text="Scheduled Assignments" TextWrapping="Wrap" />






























ToolTipService.ToolTip="{Binding Scheduled}"





Content="{Binding Scheduled}"





Tag="{Binding EmployeeID}"









Style="{StaticResource UnderlinedHyperlinkButton}"










</HyperlinkButton >





















<tkData:CountFunction ResultFormatString="{}{0} " />














Private Sub HyperlinkButton_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)



miEmployeeID = sender.tag




Select Case DirectCast(sender, System.Windows.Controls.HyperlinkButton).Name




Case "Scheduled"




Dim odlgScheduled As New dlg_Scheduled(miEmployeeID)





End Select




End Sub


1 Answer, 1 is accepted

Sort by
Vanya Pavlova
Telerik team
answered on 30 Mar 2011, 02:30 PM
Hello Terry,

Once you predefined either the Footer of GroupFooterTemplate of a GridViewColumn (as it is shown in our Totals demo} you can place anything you need there, please refer to the markup below:

<telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding Property1}">
                        <telerik:CountFunction Caption="Total:"/>
                       <StackPanel Orientation="Vertical">
                                <TextBlock Text="Some Text"/>
                                <telerik:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center">
                                            <StackPanel Orientation="Vertical">
                                                <TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}"/>
                                                <HyperlinkButton x:Name="hbtnTest" TargetName="_blank" Content="RadGridView/Silverlight" NavigateUri=""/>
                                               <telerik:RadButton Content="{Binding Caption}" Click="RadButton_Click"/>
                                            <StackPanel Orientation="Vertical"/>

Vanya Pavlova
the Telerik team
Asked by
Terry Newton
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question