Since every piece of the grid is a webcomponent you can use the components of the grid that display rowcount
, startrow
and endrow
values dynamically in the caption. These values will AUTOMATICALLY update since they are webcomponents and we have mutation watchers for these values to change and update on their own.
Code Example
<zg-caption>
<div>
<h2><code>zg-text</code> example<h2>
<ul>
<li>Row Count:<zg-text value="rowcount"></zg-text>
</li>
<li>Start Row:<zg-text value="startrow"></zg-text>
</li>
<li>End Row:<zg-text value="endrow"></zg-text>
</li>
</ul>
</div>
</zg-caption>
Documentation Links
Documentation here: https://www.zinggrid.com/docs/api/tags/zg-text