# How to export a gridview content inside a custom email template

**URL:** <https://discuss.workflowgen.com/t/how-to-export-a-gridview-content-inside-a-custom-email-template/2122>\
**Category:** Form Designer\
**Created:** [January 24, 2023, 8:45pm UTC](https://discuss.workflowgen.com/t/how-to-export-a-gridview-content-inside-a-custom-email-template/2122 "2023-01-24T20:45:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyelle](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/lyelle/32/455_2.png) [@lyelle](https://discuss.workflowgen.com/u/lyelle)\
**Post date:** [January 24, 2023, 8:45pm UTC](https://discuss.workflowgen.com/t/how-to-export-a-gridview-content-inside-a-custom-email-template/2122/1 "2023-01-24T20:45:57Z")

</div>

# Overview

This article shows you how to export the content of a gridview in order to display it inside an HTML table for your custom notification.

In the `GRIDVIEW_IN_CUSTOM_EMAIL` sample process, we’ll be exporting the default gridview sample.

> **Note:** The sample process and code example are provided as-is. You can adapt the code if you want a different style instead of a simple HTML table.

# Implementation

1. In the form designer, add a new textbox field, which will contain the HTML table of your gridview content.

2. In the Form Designer code-behind, add the following code to create new event on the **Submit** button. This will be the event that generates your gridview’s HTML template.

3. Add the method that will be called by the event on the submit button. To do this:

4. On the **Data** tab, add your custom email template and use the value of your textbox field that contains the HTML table.

5. On your action’s **Notification** tab, create an additional notification that will use your custom email template.

A sample process can be found on the WorkflowGen GitHub community:

> **[workflowgen-community/samples/gridview-data-in-custom-notification at main ·...](https://github.com/advantys/workflowgen-community/tree/main/samples/gridview-data-in-custom-notification)**
>
> WorkflowGen community repository. Contribute to advantys/workflowgen-community development by creating an account on GitHub.
