Cell Double Click Event

4 posts, 1 answers
  1. Ercument Berktas
    Ercument Berktas avatar
    5 posts
    Member since:
    May 2008

    Posted 20 Jun 2013 Link to this post

    Hi,
    We need a cell double click event on our pivot in order to get the values on that row and column. Our pivot's sample is attached.
    We tried the code block below. But did not work. Can you help about this. Our product version is 2013.1.220.20
    private void PivotGridReport_CellCreating(object sender, Telerik.WinControls.UI.PivotCellCreatingEventArgs e)
    {
          e.CellElement.DoubleClick += new EventHandler(CellElement_DoubleClick);
    }
     
    void CellElement_DoubleClick(object sender, EventArgs e)
    {
     
    }
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 24 Jun 2013 Link to this post

    Hello,

    Thank you for writing.

    You can get the double clicked cell values in few easy steps:
    • Handle the RadPivotGrid MouseDoubleClick event
    • Get the clicked cell in a PivotCellElement object using proper casting
    • Use the object to get cell values you want

    Here is the sample code that corresponds the steps i took:

    private void radPivotGrid1_MouseDoubleClick(object sender, MouseEventArgs e)
    {        
        PivotCellElement currentCell =radPivotGrid1.PivotGridElement.ElementTree.GetElementAtPoint(e.Location) as PivotCellElement;
        if (currentCell != null)
        {
            var cellValue = currentCell.Value;
            var column = currentCell.Column.Name;
            var row = currentCell.Row.Name;
        }
    }

    I hope this helps. Should you have any other questions do not hesitate to ask.

    Regards,
    Mitko
    Telerik
    RadChart for WinForms is obsolete. Now what?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ryan
    Ryan avatar
    5 posts
    Member since:
    May 2012

    Posted 11 Nov 2013 Link to this post

    <script type="text/javascript">
        function onDblClick(sender, eventArgs) {
            __doPostBack("<%= ReportPivotGrid.UniqueID %>", "RowDoubleClicked:" + eventArgs);
        }
    </script>
    I am catching the Double Click Event, but am not certain how to get the current Index, when using a Rad Grid the command would be

    get_itemIndexHierarchical

    What argument does the PivotGrid require?
  5. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 14 Nov 2013 Link to this post

    Hello Ryan,

    Thank you for contacting Telerik support.

    I think that you have posted your question in a wrong forum because this thread is for RadPivodGrid for WinForms. I want to kindly ask you to post your question in the appropriate forum section. This way you will receive proper answer to your question.

    Thank you in advance for your patience and cooperation.  

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    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