Add custom columns to a cross-table

Technologies > User Interface Add-Ins> Grouping Views> Two-dimensional cross-table with filter and custom column titles

Technologies > User Interface Add-Ins > Grouping Views> Two-dimensional cross-table with drill-down and custom columns

These examples demonstrate how the data set may be modified before displaying values in a cross-table.

In the JavaScript, define the afterGetData auto-wired function for the cross-table panel. Pass as a parameter the dataSet object, which is the data set received from the server:

panelId_afterGetData: function(panel, dataSet)


The column label may be set by modifying dataSet.columnValues[n].l :

for (var c = 0; c < dataSet.columnValues.length; c++) {
var columnTitle = ...
dataSet.columnValues[c].l = columnTitle;
}


To add new columns to the panel, create a new collection of column values. This collection can then be used to replace the values in the original data set:

var columnValues = new Ext.util.MixedCollection();
columnValues.add('UNKNOWN', subtotal);
...


Example 1: http://localhost:8080/archibus/schema/ab-products/solutions/parts/cross-table/ab-budget-by-program-crosstab.axvw

Example 2: http://localhost:8080/archibus/schema/ab-products/solutions/parts/cross-table/ab-prop-view-analysis-2d-all-values.axvw