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

MouseLeftButtonDown not firing

2 Answers 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 27 Nov 2013, 09:35 PM
Hi,

I am porting my code over from a standard silverlight gridview to the telerik one and i realized the the leftbuttondown event does not trigger any of my code on the c# side.

I searched on your forum and it seems to be a old problem, but even after tryign some of the solutions it still doesnt work.  what i have right now is:
        <telerik:RadGridView x:Name="dataGrid1" GroupRenderMode="Flat" Opacity=".85" Margin="3,27,0,12"
                             HorizontalAlignment="Left" VerticalAlignment="Top" 
                             IsReadOnly="True" MouseLeftButtonDown="dataGrid1_Click"
                             AutoGenerateColumns="True"
                             Height="207"
                             CanUserFreezeColumns="True"
                             RowIndicatorVisibility="Collapsed"
                             CanUserResizeColumns="True" Width="828">
        </telerik:RadGridView>
  
//c#:
    this.dataGrid1.AddHandler(FrameworkElement.MouseLeftButtonDownEvent, new System.Windows.Input.MouseButtonEventHandler(dataGrid1_Click), true); 
            ...
 void dataGrid1_Click(object sender, System.Windows.Input.MouseButtonEventArgs e)
    {
    //my code here
    }

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 28 Nov 2013, 10:22 AM
Hello,

I have tested this code in a test project and the dataGrid1_Click event was raised once I clicked on the dataGrid1.

Is it not the case in your solution when you set a breakpoint in the method? 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kevin
Top achievements
Rank 1
answered on 28 Nov 2013, 07:32 PM
hm - my apologies cleaning and rebuilding the solution seemed to have solved it for me.

thanks for the help though.
Tags
GridView
Asked by
Kevin
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or