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

Cell is not activated on click of Hyperlink Column in RadGridView

1 Answer 93 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Allan Hill
Top achievements
Rank 1
Allan Hill asked on 08 Sep 2010, 06:54 AM
We are having Rad Grid View control with "GridViewHyperlinkColumn" column.
When we click on hyperlink available in grid view cell, either cell is not activated or row is not selected.

We have set following properties for rad grid view control

IsSynchronizedWithCurrentItem="True"
SelectionMode="Single"

Can anyone help or provide solution?

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 08 Sep 2010, 11:49 AM

Hello Allan Hill,

This type of column will handle all mouse events which will prevent those events from reaching the rows and ultimately invoking our selection mechanism. You could try the following workaround to manually select a row when a hyperlink is clicked:

public MainWindow()
{
    InitializeComponent();
  
    this.AddHandler(Hyperlink.ClickEvent, new RoutedEventHandler(hyperlinkClicked));
}
  
void hyperlinkClicked(object sender, RoutedEventArgs args)
{
    Hyperlink hyperLink = args.OriginalSource as Hyperlink;
    HyperlinkButton button = hyperLink.Parent as HyperlinkButton;
  
    var row = button.ParentOfType<GridViewRow>();
    row.IsSelected = true;
}



Best wishes,
Milan
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Allan Hill
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or