[Data Grid] Properties in Column have no effect

Forge Component
(32)
Published on 4 Dec (2 days ago) by OutSystems R&D
32 votes
Published on 4 Dec (2 days ago) by OutSystems R&D

Hello,

I checked out this component to see if it could serve to satisfy some requirements, but I keep bumping into some issues.

Most of the AdvancedFormat properties detailed in the Wijmo website don't seem to change the Data Grid columns:


Using this on a GridColumnNumber will correctly format the number with no group separators but the input type will remain "tel" and you can still type more than 9 digits into the field - the format property works correctly, but inputType and maxLength have no effect:

I also can't find a way to make the Validation field trigger an error. You can see this by checking the sample. The "Amount" column is supposed to perform a validation:

But you are free to insert any value in the column. I can't find an example of a working validation anywhere.

Has anyone bumped into these issues? What am I doing wrong?

Solution

Over the last few weeks I have filed support tickets on the following issues that match some of your observations.

Formatting being ignored by wijmo's default editor

1.  There is a bug in the wijmo grid itself in which the format property is being ignored by the input editor.

2.  The wijmo work around for their bug is to create your own Custom Editor.  I have confirmed their work around works for the non OutSystems wrapped version of the grid.

3.  I have tried the wijmo work around with the OutSystems DataGrid, but it fails.

4.  I have tried using OutSystems' version of the Custom Editor that was derived from the Wijmo CustomEditor workaround example, but it also fails.

Ignored parameters

Add AutoMerge to the list of non functioning parameters.

Validators

The only Validator that has failed for me is the regex pattern function in the sample.  Any expression passed into the pattern function that contains the characters '(' or ')' fails.  The OutSystems work around was to create a custom pattern Validator for each unique regular expression needed.  The failure is due bad OutSystems code where a regex is used to split source code function invocations in two parts, a list of functions and a list of input parameters.

Workaround - Actual Code

To get things done, I have created a web block that contains the DataGrid bound to a service that returns very little data.  The DataGrid is wrapped in a container with no visibility.  After the DataGrid wrapper, create new container and give it a name.  After new named container, drop in a JS widget and paste in some source code from one of wijmo's purejs examples.  The adhock creation of the wijmo grid picks up the wijmo license key from initial hidden OutSystems DataGrid.

I have found that using actual code (wijmo initialization flavor) to drive the DataGrid settings is faster than making and setting the Grid and Columns widgets in ServiceStudio.  I wish there was a licensed wijmo template of the Grid available as templates would make manual grid setup potentially even easier.


Solution

Thank you for the tips and for sharing workarounds - this has a lot of potential but still feels a bit raw. We ended up deciding to implement something similar with a Table Records and jQuery Validate for instant input validations.