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
close icon

Customize Drill Through Columns?

I am using the JavaScript ES5 PivotGrid tool. The drill through is working and pops up a little grid correctly in a new window.  I have a three separate questions:
  • Can I customize the displayed columns that display in the drill through popup using code? I want more columns to be displayed than the "bounded fields" defined in the initial code.  I don't want to have to force the user to add new columns to get it to work.
  • Can I customize the order of the columns in the drill through popup using code? It looks like it shows the columns in the reverse order from the data source.
  • If I cannot use code to control the displayed columns, then is there some way to define "bounded fields" in the pivot table without having them be displayed in the normal (not drill through popup) pivot table results? For example, I would like to define a bounded field (so that it displays in the drill through) but doesn't get bound to rows, columns, values, or filters.
Just to be clear, the drill through is working correctly.  I just want to customize some of the columns that appear in the drill through window with code (so the user doesn't have to select the columns each time).

If you provide code, please provide it in JavaScript ES5 control usage. 

Thanks,
/Greg

1 Reply

SN Sivamathi Natarajan Syncfusion Team December 4, 2019 12:07 PM UTC

Hi Greg, 
 
Thanks for contacting Syncfusion Support. 
 
Please find the below response. 
 
Query 
Response 
Can I customize the displayed columns that display in the drill through popup using code? I want more columns to be displayed than the "bounded fields" defined in the initial code.  I don't want to have to force the user to add new columns to get it to work. 
We have prepared a sample for your requirement. Kindly check the below code example. 
 
Code Example:  
 
 beginDrillThrough: function (args) { 
    for (var i = 0; i < args.cellInfo.rawData.length; i++) { 
      args.cellInfo.rawData[i].Update = "New"; 
    } 
    args.gridObj.columns.push({field: "Update", headerText: "Update", width: 120, visible: true, type: "string", editType: ""}) 
  }, 
 
 
 
Please check the below screenshot. We have included one column in the drill through dialog.   
  
 
Can I customize the order of the columns in the drill through popup using code? It looks like it shows the columns in the reverse order from the data source. 
You can change the order by drag and drop the column field in drill through dialog or change the order of column data using below option. 
Code Example. 
beginDrillThrough: function (args) { 
   var columnOrder = args.gridObj.columns; 
  }, 
// Receive the order of column in columnOrder variable. You can rearrange the column as per your requirement. 
 
 
You can also allow column to sort, filter and filter the data. Kindly check the below documentation link. 
 
 
 
Please let us know if you have concern. 
 
Regards, 
Sivamathi. 


Loader.
Live Chat Icon For mobile
Up arrow icon