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

Problem with RadGridView Mouse Click Events

4 Answers 387 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vimarsh Sharma
Top achievements
Rank 1
Vimarsh Sharma asked on 02 Mar 2010, 06:34 AM
Hello Telerik Team,

 Currently i m facing problem in the latest version dll of RadGridView which doesn't allow me to grab the Mouse event called MouseLeftButtonUp="dgOrg_MouseLeftButtonUp" or Down. In previous dll version that is Q2 or 2.0 , it is working fine.
And i have upgraded to latest version, So i can use new features. 

I have been stuck-up due to this problem, So plz if you have any solution for this problem then reply.

Thanks,
Vimarsh

4 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 02 Mar 2010, 07:40 AM
Hello Vimarsh Sharma,

Since Q3 several mouse events are handled by RadGridView. Could you please take a look at this forum thread. Basically there are two workarounds for the problem that you are e experiencing - The first one is to use one of the Preview events in XAML and the other one is to use the AddHandler method in code-behind, which gives you the ability to handle already handled events.

Kind regards,
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.
0
Vimarsh Sharma
Top achievements
Rank 1
answered on 02 Mar 2010, 08:19 AM
Hello Milan,

As i m using OnMouseLeftButtonDown inside xaml page. This event doesnt reflect in xaml.cs file while debugging. So how can i add handler on code behind ? if u can provide any example then it would be helpful and beneficial to me.

Thanks
Vimarsh
0
Accepted
Milan
Telerik team
answered on 02 Mar 2010, 09:23 AM
Hello Vimarsh Sharma,

you can replace the XAML code with something similar to this:

public MainPage()
{
    InitializeComponent();
  
    Mouse.AddMouseDownHandler(this.myGrid, new EventHandler<MouseButtonEventArgs>(OnMouseDown), true);
}
  
// required namespace: Telerik.Windows.Input, Telerik.Windows.Controls
private void OnMouseDown(object sender, MouseButtonEventArgs e)
{
      
}


Regards,
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.
0
Vimarsh Sharma
Top achievements
Rank 1
answered on 02 Mar 2010, 09:46 AM
Hello Milan,

Thanks for that example code. I used that and manage it, immediately my issue got resolved.

Thanks once again,

Vimarsh
Tags
GridView
Asked by
Vimarsh Sharma
Top achievements
Rank 1
Answers by
Milan
Telerik team
Vimarsh Sharma
Top achievements
Rank 1
Share this question
or