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,
    Davide
  2. Answer
    Rosen Vladimirov
    Admin
    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:
    <pivot:RadPivotGrid.CellTemplate>
        <DataTemplate>
            <Border Background="Transparent">
                <TextBlock Text="{Binding Data}" Margin="0 0 4 0"  HorizontalAlignment="Right"/>
            </Border>
        </DataTemplate>
    </pivot:RadPivotGrid.CellTemplate>

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

    Regards,
    Rosen Vladimirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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. UI for WPF is Visual Studio 2017 Ready
Back to Top