We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Drill through

Hi,

The overview page on the syncfusion website mentions the ability to "drill through" and obtain the specific information on a data entry that contributes to the selected number. However, there appears to be no documentation on this for winforms.

How do you do the drill through in code (c#)?

Thanks!

1 Reply

JP Jagadeesan Pichaimuthu Syncfusion Team May 28, 2019 12:53 PM UTC

Hi Travis,

Thank you for contacting Syncfusion support.

We have analyzed the reported query “How to achieve the drillthorugh support in the pivot grid control”. You can get the specific information for the selected cell by using the GetRawItemsFor method which is available in PivotEngine. GetRawItemsFor method is used to obtain the list of raw items for value cell, total cell or grand total cell in the pivot grid. You can find out the selected row and column index values by using CellClick event handler.

Please refer the following code sample.
 
#Form1.cs 
  
        private Syncfusion.Windows.Forms.Grid.GridDataBoundGrid gridDataBoundGrid1; 
  
        public Form1() 
        { 
            InitializeComponent(); 
            InitializePivotGrid(); 
            this.pivotGridControl1.TableControl.CellClick += TableControl_CellClick; 
        } 
  
        //Get the raw items for selected cells(value and sumary cells) 
        private void TableControl_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e) 
        { 
            PivotGridControlBase pivotGridControlBase = sender as PivotGridControlBase; 
            if (pivotGridControlBase != null) 
            { 
                int row = pivotGridControlBase.CurrentCell.RowIndex - 1; 
                int col = pivotGridControlBase.CurrentCell.ColIndex - 1; 
  
                var rawItems = this.pivotGridControl1.PivotEngine.GetRawItemsFor(row, col); 
                this.gridDataBoundGrid1.DataSource = rawItems; 
            } 
        } 
  
  
Please let us know if you need any further assistance.

Regards,
 
Jagadeesan 


Loader.
Up arrow icon