MouseLeftButtonDown not firing

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    12 posts
    Member since:
    Oct 2013

    Posted 27 Nov 2013 Link to this post

    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. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 Nov 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Kevin
    Kevin avatar
    12 posts
    Member since:
    Oct 2013

    Posted 28 Nov 2013 Link to this post

    hm - my apologies cleaning and rebuilding the solution seemed to have solved it for me.

    thanks for the help though.
Back to Top