---
updatedAt: 2025-06-03T01:07:50.000Z
agentTools:
  projectIndex: https://docs.knack.com/v3/llms.txt
---

# View Render

## View Render

* Triggered when a view has completed rendering
* Keep in mind that if you use **knack-view-render.any**, your code will be execute once for *each* view on each page, so a page with four views will run the same code four times.

```javascript
// Change "view_1" to the view you want to listen for
$(document).on('knack-view-render.view_1', function(event, view, data) {
  // Do something after the view renders
  alert('listener for view: ' + view.key);
});
```

**Events**

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Event
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        knack-view-render.any
      </td>

      <td>
        Triggered by all views
      </td>
    </tr>

    <tr>
      <td>
        knack-view-render.view\_1
      </td>

      <td>
        Triggered by a single view specified by key
      </td>
    </tr>

    <tr>
      <td>
        knack-view-render.type
      </td>

      <td>
        Triggered by all views of the specified type. Replace “type” with form, menu, search, list, calendar, search, or details
      </td>
    </tr>
  </tbody>
</Table>

**Parameters**

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        view
      </td>

      <td>
        The view (JSON object)
      </td>
    </tr>

    <tr>
      <td>
        data
      </td>

      <td>
        Array of the records currently visible (JSON objects)
      </td>
    </tr>
  </tbody>
</Table>