Creating Highlighted Rows
This is a quick video tutorial showing how to add highlighted rows to a dashboard as a few people had emailed asking this:
How to Highlight Rows in an sqlDashboard
The video content presented here requires JavaScript to be enabled and the latest version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Adobe Flash Player by downloading here.
To highlight a row we use specially named sqlDashboards columns SD_ that affect how the result is displayed but are not shown in the table
- Add a column called SD_BGCOLOR specifying a color to use for the background of that row e.g. ‘green’ or using HTML hex triplet notation e.g. #224466
- Add a column called SD_FGCOLOR specifying the color to use for the foreground of that row
Hex triplet is a six-digit, three-byte hexadecimal number used in HTML, CSS, SVG, and other computing applications to represent colors. The bytes represent the red, green and blue components of the color. One byte represents a number in the range 00 to FF (in hexadecimal notation), or 0 to 255 in decimal notation. This represents the least (0) to the most (255) intensity of each of the color components.
Using Case When
Commonly you will probably want to use SQL’s CASE-WHEN to alternate colors depending on an existing column value. e.g.
[raw]
[/raw]