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

RadGridView MouseLeftButtonUp

3 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matthew Cartwright
Top achievements
Rank 1
Matthew Cartwright asked on 04 Dec 2009, 04:17 PM
Hi,

I would like to get hold of the "data item behind the click" on a RadGridView. This is not working for me, the event is not getting triggered:

<gridView:RadGridView x:Name="dgPeople"   
RowIndicatorVisibility="Collapsed"   
ShowGroupPanel="False"   
ItemsSource="{Binding SelectedTeam.People}"   
MouseLeftButtonUp="RadGridView_MouseLeftButtonUp" /> 


        private void RadGridView_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)  
        {  
            UIElement clickedElement = e.OriginalSource as UIElement;  
            if (clickedElement != null)  
            {  
                GridViewRow row = clickedElement.ParentOfType<GridViewRow>();  
 
            }  
        } 

EDIT:
Further testing has shown that the click event is triggered when I am not clicking on top of a populated cell or header. It works when I click elsewhere on the grid.

Also, based on this post, I should have some extension methods available to me. I am not seeing these in intellisense.

I am using Telerik.Windows.Controls.GridView.dll v2009.3.1103.1030

Mark

 

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Dec 2009, 06:49 AM
Hi Matthew,

Please check this sticky thread for more info about MouseLeftButtonUp/Down. ParentOfType and ChildrenOfType are extension methods in Telerik.Windows.Controls namespace.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John
Top achievements
Rank 1
answered on 15 Apr 2010, 05:49 PM
This sticky is a dead link.  The server reports an error (Oops page).

Thanks
J
0
Vlad
Telerik team
answered on 16 Apr 2010, 07:05 AM
Hello,

Please check this thread instead.

Regards,
Vlad
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
Matthew Cartwright
Top achievements
Rank 1
Answers by
Vlad
Telerik team
John
Top achievements
Rank 1
Share this question
or