Get DoubleClicked Cell and its Data Coordinates

2 posts, 1 answers
  1. purdav
    purdav avatar
    26 posts
    Member since:
    Feb 2007

    Posted 17 Oct 2013 Link to this post

    Hi all,
    Is there a way to get the clicked cell (double click) with 2013-3 version?
    In the previous versions and internal builds (since one or two month ago) I was able to get clicked cell with this code:
    private void pivot_MouseDown(object sender, MouseButtonEventArgs e)
                if (e.ClickCount == 2)
                    RadPivotGrid p = sender as RadPivotGrid;
                    FrameworkElement cell = e.OriginalSource as FrameworkElement;

    then with cell object I was able to read properties such MDX coordinates to open for example a drill down data window.

    Now if I try this code the cell variable is null. How can I get clicked cell and then MDX coordinates? Is it possible?

    Many thanks in advance!

    Best Regards,
  2. Answer
    Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 18 Oct 2013 Link to this post

    Hello Davide,

    We have applied some optimizations on RadPivotGrid which caused the change of the behavior. In order to use MouseLeftButtonDown event to access the cells, you will have to modify the cell template (or use cell template selector) and use TextBlock instead of the default state:
            <Border Background="Transparent">
                <TextBlock Text="{Binding Data}" Margin="0 0 4 0"  HorizontalAlignment="Right"/>

    Please accept our apology for the caused inconvenience. We'll consider adding Drill Down functionality for RadPivotGrid for one of our next releases.

    Rosen Vladimirov
    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 >>
Back to Top