Skip to content

DevExpress-Examples/web-forms-dashboard-obtain-underlying-data-for-clicked-visual-element-in-custom-item

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for Web Forms - How to Obtain Underlying Data for a Clicked Visual Element in a Custom Item

This example shows how to obtain underlying data in a custom dashboard item when a user clicks the item's visual element. The custom item is based on the dashboard-extension-funnel-d3-item. The DashboardControl's API is used to get underlying data and display it in the dxPopup DevExtreme UI component:

FunnelD3ItemViewer.prototype._showUnderlyingData = function (arguments) { if(!this.viewerApiExtension) return; var clientData = this.viewerApiExtension.getItemData(this.getName()); var columns = clientData.getDataMembers(); var requestParameters = { dataMembers: columns, uniqueValuesByAxisName: { "Default": arguments } }; this.viewerApiExtension.requestUnderlyingData(this.getName(), requestParameters, function (data) { var underlyingData = []; dataMembers = data.getDataMembers(); for (var i = 0; i < data.getRowCount() ; i++) { var dataTableRow = {}; dataMembers.forEach(function(dataMember) { dataTableRow[dataMember] = data.getRowValue(i, dataMember); }); underlyingData.push(dataTableRow); } new dxPopup(document.getElementById('myPopup'), { height: 800, showTitle: true, title: "Underlying Data", visible: true, contentTemplate: function () { var div = document.createElement('div'); new dxDataGrid(div, { height: 800, scrolling: { mode: 'virtual' }, dataSource: underlyingData }); return div; } }); }); }

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

This example shows how to obtain underlying data in a custom dashboard item when a user clicks the item's visual element

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •