Disabling Legacy Validation in Grid Widgets
In Mashup Builder, expressions are used to apply validation to the cell content of Grid widgets. At run time, the defined expressions are executed by a validator when a cell is edited. As part of the non-secure functions enhancements, existing validators that are used to apply validation rules to cell content are replaced by a new standard one that is more secure. The new secure validator is available for each one of the following widgets in ThingWorx 9.3.2, 9.2.7, 9.1.11, and 9.0.16 or later:
Themed Grid (ptcs-grid)
Grid (Advanced)
Legacy Grid (dhxgrid)
You can set the DisableLegacyValidation property for each grid widget in a mashup to replace the legacy non-secure validator with the latest standard version.
Grid (Themable) Widgets
When you add a new Grid widget to a mashup in ThingWorx 9.3.2 or later, the latest standard validator is used by default. Therefore, the widget DisableLegacyValidation property is not available and you cannot enable the legacy validation. In addition, only the secure validators is supported when using JSON data to configure the grid dynamically.
To prevent compatibility issues, the legacy validator is used by default when you open a mashup with an existing Grid widget that was added in ThingWorx 9.3.0 or 9.3.1. We strongly recommend that you manually disable the legacy validation for the grid and use the latest standard validator instead. You can disable legacy validation in two ways:
To disable the legacy validation for all columns on the widget, set the widget DisableLegacyValidation property to true on the Properties panel.
To disable the legacy validation for specific columns on the grid, perform the following steps:
a. Select the widget on the canvas.
b. On the Properties panel, click to open the widget columns configuration dialog box.
c. In the left pane, select an editable column, then open the Column Format tab.
* 
A warning triangle is displayed next to columns that use legacy validation.
d. Under Expression Validator, select Validator.
e. Review the validation expression and remove any references to unsupported functions or objects. For more information see Supported Runtime Functions and Objects.
f. Repeat steps 3 through 5 for any additional columns that use the legacy validation.
g. Click Done to close the dialog box, then save the mashup.
* 
You should review and update any existing widget when using JSON data to configure the grid dynamically. Using unsupported objects or functions within a JSON configuration service may prevent the validation from working correctly. The grid supports the new secure version of the validator when using JSON configuration data. You must update data services to use the latest secure grid when reusing a JSON configuration service from a legacy or advanced grid.
Grid (Advanced) and Grid (Legacy) Widgets
You can disable legacy validation for Grid (Advanced) and Grid (Legacy) widgets in your mashups using the DisableLegacyValidation property. Unlike the Grid (ptcs-grid) widget, you cannot disable the legacy validation for specific columns using the columns configuration dialog box.
To disable the legacy validation for the Grid (Advanced) widget in ThingWorx 9.3.2, 9.2.6, and 9.1.11 or later
1. Select the widget on the canvas
2. On the Properties panel, set the DisableLegacyValidation property to false.
3. Open the columns configuration dialog box, then review the validation expressions that are defined for each grid column
4. Remove any references to unsupported functions or objects. For more information see Supported Runtime Functions and Objects.
5. Save the mashup.
The latest validator is now used to validate cell data for all editable columns on the grid.
In ThingWorx 9.0.x, validation configuration for the advanced grid is only supported using JSON configuration data. To disable legacy validation, set the DisableLegacyValidation property to false, then manually review the validation expressions that are defined in the JSON configuration. Using unsupported functions of objects in the JSON configuration may prevent the widget from working correctly.
Was this helpful?