This question is locked. New answers and comments are not allowed.
                        
                        Hello,
I need some help. I have a gridview with three columns.
In the first, the document name & In the second and the third, a hyperlink.
I would like on the "click" of the line (so the SelectedChanged),open a document externally, the while keeping my selected row in my GridView.
Initially, I used a Hyperlink to my document name. It worked but I didn't keep the selected row.
And when I had a hundred lines, I didn't know that I had just opened (where the interest of keeping my line selected on opening an external link).
Do you have an idea for my problem to open external link on the SelectedChanged ?
Thank you ;)
                                I need some help. I have a gridview with three columns.
In the first, the document name & In the second and the third, a hyperlink.
I would like on the "click" of the line (so the SelectedChanged),open a document externally, the while keeping my selected row in my GridView.
Initially, I used a Hyperlink to my document name. It worked but I didn't keep the selected row.
And when I had a hundred lines, I didn't know that I had just opened (where the interest of keeping my line selected on opening an external link).
Do you have an idea for my problem to open external link on the SelectedChanged ?
Thank you ;)
6 Answers, 1 is accepted
0
                                
                                                    Pierre
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 29 Mar 2012, 02:22 PM
                                            
                                        A little "Up"
Some one have an idea?
                                        Some one have an idea?
0
                                Hello,
Greetings,
Didie
the Telerik team
                                         You could define a CellTemplate for your column. In the CellTemplate use a HyperlinkButton and subscribe for its Click event. Once the event is raised you can handle the Selection programmatic. 
For example:
private void HyperlinkButton_Click(object sender, RoutedEventArgs e)        {            GridViewRow parentRow = ((HyperlinkButton)sender).ParentOfType<GridViewRow>();            parentRow.IsSelected = true;        }Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
                                
                                                    Pierre
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 02 Apr 2012, 08:48 AM
                                            
                                        Hello,
Thanks for your idea but it doesn't work..
In fact, I have an error : " ParentOfType isn't a member of System.Windows.Controls.HyperlinkButton "
This is my code :
I tried to remplaced "GridViewRow" by "GridViewCell".. but with no succes..
An other idea, please :) ?
                                        Thanks for your idea but it doesn't work..
In fact, I have an error : " ParentOfType isn't a member of System.Windows.Controls.HyperlinkButton "
This is my code :
Dim parentRow As GridViewRow = DirectCast(sender, HyperlinkButton).ParentOfType(Of GridViewRow)()
parentRow.IsSelected = TrueI tried to remplaced "GridViewRow" by "GridViewCell".. but with no succes..
Dim parentRow As GridViewCell = DirectCast(sender, HyperlinkButton).ParentparentRow.IsSelected = TrueAn other idea, please :) ?
0
                                
                                                    Pierre
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 05 Apr 2012, 09:55 AM
                                            
                                        A New Up ;)
An idéa ?
                                        An idéa ?
0
                                
                                                    Pierre
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 19 Apr 2012, 08:40 AM
                                            
                                        A New Up ;)
An idéa ?
Please
                                        An idéa ?
Please
0
                                Hello,
Vlad
the Telerik team
                                        You need to add Telerik.Windows.Controls namespace in your usings to use these extension methods.
Regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
