How does WorkflowGen validate the GridView control using the FORM_FIELD_REQUIRED parameter?

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.

Are these instructions the same for WorkflowGen version 7.3.1?

Thank you.

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

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

Hi James,

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

52 PM

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

Best Regards,
Eddy.