Generated Content Model

The User Content Model below illustrates how easy it is to get a grid up-and-running by adding only a few elements and attributes. The Generated Content Model shows what is actually rendered into the DOM from those configuration settings.

The generated source is important to understand if you want to customize the styling of the grid beyond choosing a pre-built theme. See the guide on styling the grid for further information on customizing your grid's display.

  <!-- Grid Header (generated) -->

    <!-- Caption (user-added or generated) -->

      <!-- Remove Selected Rows (generated) -->
      <zg-button action="removerecord"></zg-button>

        Context Menu Button (generated)
        (mimics the right-click context-menu, but from a fixed location)
        (toggles the <zg-menu> Context-Menu shown below)
      <zg-button action="fixedmenu"></zg-button>

        Column Menu (generated)
        (toggle per-column visibility)
      <!-- Toggle Button -->
      <zg-button action="menu"></zg-button>
      <!-- Dropdown -->
          <zg-button action="checkbox"></zg-button>
      <!-- Grid Search (generated) -->


    <!-- Source (user-added or generated) -->

    <!-- Controls Bar (generated) -->
      <!-- Select All Rows -->
      <!-- Insert New Record -->
      <zg-button action="createrecord"></zg-button>
      <!-- Enable Batch Edit Mode -->
      <zg-button action="batchedit"></zg-button>
      <!-- Save Batch Edit Changes -->
      <zg-button action="batcheditsave"></zg-button>
      <!-- Cancel Batch Edit Changes and Exit Mode -->
      <zg-button action="batcheditcancel"></zg-button>
      <!-- Change Layout Mode -->
        <zg-button action="layoutcard"></zg-button>
        <zg-button action="layoutrow"></zg-button>


  <!-- Use Inline or External Data Source (user-added) -->
    <!-- Configure Data With Parameters -->

  <!-- Columns Group (user-added or generated) -->
  <!-- (analogous to HTML table '<colgroup>') -->
  <!-- [id="(left|right)colgroup"] are generated -->
    <!-- Format Column(s) (1 to N) -->
    <!-- (analogous to HTML table '<col>') -->
    <!-- Note: Not required, but if you need to customize one column, you need to specify them all -->

  <!-- Custom 'Card' Layout Template (user-added or generated) -->
  <!-- Note: Replaces the normal <zing-grid layout="card"> display -->
  <zg-card><!-- User Defined Code --></zg-card>

  <!-- Grid Data Table 'Head' (generated) -->
  <!-- (analogous to HTML table '<thead>') -->
      <!-- 'Head' Cells (1 to N) -->
      <!-- (analogous to HTML table '<th>') -->
        <!-- Column Sorter (generated) -->
        <zg-icon name="down" init>
        <!-- Column header tooltip (generated) -->
        <zg-icon name="info" init>
        <!-- Column Resize Handles (generated) -->
        <!-- Column Filter Menu (generated) -->
        <zg-button action="filter"></zg-button>
    <!-- Filter Column(s) Controls -->
    <!-- Optional Aggrigation Cell (sum, average, etc.) -->

  <!-- Grid Data Table 'Body' (generated) -->
  <!-- (analogous to HTML table '<tbody>') -->
      <!-- 'Body' Cells (1 to N) -->
      <!-- (analogous to HTML table '<td>') -->
      <!-- <zg-card> Instance (conditional) -->
      <!-- (if user-defined <zg-card> template added, its result rendered here -->

  <!-- Grid Data Table 'Foot' (generated) -->
  <!-- (analogous to HTML table '<tfoot>') -->
    <!-- Optional Aggrigation Cell (sum, average, etc.) -->

  <!-- Drag-Select Multiple Cells For Action (generated) -->
  <!-- The Currently-Selected Cell (generated) -->

  <!-- The Pagination Element (user-added or generated) -->
  <!-- (Contains 'per page' dropdown, next/previous buttons, and total records data) -->
  <!-- (Location of elements controlled by slot naming) -->
    <zg-select action="pagesize">
      <!-- Page Size List (generated) -->
    <zg-button action="reload"></zg-button>
    <zg-button action="firstpage"></zg-button>
    <zg-button action="prevpage"></zg-button>
    <zg-input action="currpage"></zg-input>
    <zg-text value="pagecount"></zg-text>
    <zg-button action="nextpage"></zg-button>
    <zg-button action="lastpage"></zg-button>
    <zg-text value="startrow"></zg-text>
    <zg-text value="endrow"></zg-text>
    <zg-text value="rowcount"></zg-text>

  <!-- Grid Footer (generated) -->
    <!-- Caption Alternate Position (generated-only) -->
    <!-- Source Alternate Position (generated-only) -->

  <!-- Internal Dialogs (modal overlays - generated) -->
  <!-- User-Defined Dialogs (user-added - <zg-dialog type="custom">) -->
  <!-- Inline-Edit Grid Row (generated) -->

  <!-- Grid Action(s) Context Menu (generated) -->
    <!-- Contains any combination of <zg-menugroup>, <zg-menuitem>, and <zg-separator> -->
    <zg-menu-group group="insert-record-group">
      <zg-button action="cancelrecord"></zg-button>
    <zg-separator action="action"></zg-separator>

  <!-- Filter Menu (generated) -->

  <!-- Status Messages (generated) -->

  <!-- Tooltip (generated) -->

  <!-- Frozen Columns Group (generated) -->

  <!-- Define Batch Edit Area (generated) -->

  <!-- No Data Message (user-added or generated) -->

  <!-- Grid Loading Mask (user-added or generated) -->

[api: generated content model]

On This Page