# How does WorkflowGen validate the GridView control using the FORM\_FIELD\_REQUIRED parameter?

**URL:** <https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233>\
**Category:** Form Designer\
**Created:** [February 8, 2011, 4:06am UTC](https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233 "2011-02-08T04:06:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [February 8, 2011, 4:06am UTC](https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233/1 "2011-02-08T04:06:00Z")

</div>

WorkflowGen validates the GridView control in two ways:

- It can force that at least one data row must be entered into the GridView control before allowing the form to be submitted.

- It can force individual fields within each row to be required.

To enforce that at least one data row is provided you simply need to add the name of the GridView control to the `FORM_FIELDS_REQUIRED` action parameter.

**Example**

Let’s say there is a GridView (`GRIDVIEW1`) with three columns containing three textboxes (`gvNAME`, `gvDATE`, and `gvDEPT`)

To ensure that at least one data row in `GRIDVIEW1` is provided, set the `FORM_FIELDS_REQUIRED` action parameter to include:

`GRIDVIEW1`

To make sure the `gvNAME` and `gvDATE` fields are required when adding a new data row in `GRIDVIEW1`, set the `FORM_FIELDS_REQUIRED` action parameter to include:

`GRIDVIEW1.gvNAME, GRIDVIEW1.gvDATE`

**Note:** Make sure to include the GridView name and GridView control name separated by a period.

---

<div class="post-metadata">

**Author:** ![james](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@james](https://discuss.workflowgen.com/u/james)\
**Post date:** [June 13, 2017, 6:36pm UTC](https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233/2 "2017-06-13T18:36:17Z")

</div>

Are these instructions the same for WorkflowGen version 7.3.1?

Thank you.

---

<div class="post-metadata">

**Author:** ![jianan.hsu](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/jianan.hsu/32/411_2.png) [@jianan.hsu](https://discuss.workflowgen.com/u/jianan.hsu)\
**Post date:** [June 13, 2017, 6:44pm UTC](https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233/3 "2017-06-13T18:44:55Z")

</div>

Yes, it’s the same instruction for version 7.

See our latest Web forms developer guide for more info.

[https://advantys.gitbooks.io/workflowgen-web-forms-for-visual-studio-developer/content/web-form-development-simple-mode.html?h=Making%20the%20GridView%20read-only%20or%20required](https://advantys.gitbooks.io/workflowgen-web-forms-for-visual-studio-developer/content/web-form-development-simple-mode.html?h=Making%20the%20GridView%20read-only%20or%20required)

---

<div class="post-metadata">

**Author:** ![james](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@james](https://discuss.workflowgen.com/u/james)\
**Post date:** [January 10, 2018, 7:44pm UTC](https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233/4 "2018-01-10T19:44:01Z")

</div>

If this method is used, is it possible in .Net Code Behind (using Workflow Gen editor not Visual Studio for the process) to change the enable value of the requiredfieldvalidator? Is there a default naming convention for the RequiredFieldValidator in Workflow Gen?

I am asking as my process has a checkbox if the user wants to request a change in a previous step or cancel the request. If that checkbox is selected, the gridview control no longer requires an entry.

Thanks,

James

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [January 10, 2018, 8:45pm UTC](https://discuss.workflowgen.com/t/how-does-workflowgen-validate-the-gridview-control-using-the-form-field-required-parameter/233/5 "2018-01-10T20:45:51Z")

</div>

Hi James,

You can simply use the form designer’s validation control (for the gridview)

![52 PM](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/9194fe4adff849cf6a28d3a4b1dd0a1b0281f15c.png)

In that case, if the checkbox is checked, no entry will be required.

Best Regards,  
Eddy.
