Apex Data Grid
Show rows returned by an Apex class in a grid with search, sort, totals and export.
GridMate provides a lightning grid component GM - Apex Data Grid to display data that doesn't come from a query: an external system, a callout, computed rows or aggregates. Your Apex class returns the rows, and GridMate gives them the full grid experience: search, sort, totals, grouping, cell coloring and export.
In this tutorial, we will create an Account Health grid using GM - Apex Data Grid. For every account, an Apex class totals the opportunities and the open cases, computes the win rate, and flags the account as Healthy, Watch or At Risk.
Properties
Provider Class
AccountHealthDataGridProvider
Custom Label
Account Health
Custom Icon
standard:account
Row Limit
100
Page Size
60
Grid Height
640
Search Fields
Name,Industry
Wildcard Search
Checked
Sort
OpenPipeline
Order
desc
Aggregate
{"OpenPipeline":"sum","WonAmount":"sum","OpenOpps":"sum","OpenCases":"sum"}
Group By
Health
Show Aggregate Header
Checked
Cell Coloring
{"Health":[{"color":"#B0FD9F","exp":{"Health":{"operator":"=","value":"Healthy"}}},{"color":"#FFD59E","exp":{"Health":{"operator":"=","value":"Watch"}}},{"color":"#F7A8A8","exp":{"Health":{"operator":"=","value":"At Risk"}}}]}
Actions
[{"name":"exportHealth","label":"Export","global":true,"component":"gmpkg:ApexDataGridExportComponent","attributes":{"providerClass":"AccountHealthDataGridProvider"}}]
Show Actions as Buttons
Checked
Below is a step by step tutorial to configure the GM - Apex Data Grid component.
Next steps
Was this helpful?