Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Click Event on RowHeaderCells
posted

Hi,

Is there any event I can subscribe to that triggers when I click on a RowHeaderCell? What I'm trying to do is say my first dimension attribute is Company Name, I would like to be able to click on that item name, get out the MemberData.Name property ([Company].[Company].&[{Guid}]], and use that Guid to open up another window that allows me to see the details behind the aggregated data. Is there any way to do this?

Parents
  • 7922
    posted

    Hi

     

    We currently don’t expose Click event for RowHeaderCell. As a workaround you can use CellClicked event to reach to desire dimention. Below is a code snippet

     

    
    private void pivotGrid_CellClicked(object sender, PivotCellClickedEventArgs e)
    {
        // find cell location
        int columnIndex = pivotGrid.DataColumns.IndexOf(e.Cell.DataColumn);
        int rowIndex = pivotGrid.DataRows.IndexOf(e.Cell.DataRow);
     
        // extract the tuples
        ITuple columnTuple = PlanningPivotGrid.DataSource.Result.ColumnAxis.Tuples[columnIndex];
        ITuple rowTuple = PlanningPivotGrid.DataSource.Result.RowAxis.Tuples[rowIndex];
     
        // accordance between members and hierarchy
        // columnTuple.Members[i] = pivotGrid.DataSource.Columns[i];
        IDimension dimension = rowTuple.Members[0].ParentLevel.ParentHierarchy.ParentDimension;
    }

     now when you have dimension, you can work with dimension’s level, hierarchy and dimension itself to query cell data.

     

    For 11.1 release we will add Click event for HeaderCell.

     

    Reards

    Todor

     

Reply Children