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

Get DoubleClicked Cell and its Data Coordinates

1 Answer 115 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
purdav
Top achievements
Rank 1
purdav asked on 17 Oct 2013, 08:05 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosen Vladimirov
Telerik team
answered on 18 Oct 2013, 02:00 PM
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 >>
Tags
PivotGrid
Asked by
purdav
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or