35
Views
7
Comments
Solved
[OutSystems Data Grid] Issue with Max Value validation in Number Columns
data-grid-reactive
Reactive icon
Forge component by Gonçalo Martins
Application Type
Reactive

Hello team,

In DataGrid, if the user enters a value greater than the max value in a Number Column, it is automatically converted to the max value without any info, which is the expected behavior.

Here in our case, We are displaying the decimal (3 decimal Places) value using Number Column and we want to throw an error message instead of a force change to max value while the user is entering a value more than max value. 

We tried to handle this scenario using OnCellValueChange action. But it looks like the value was changed automatically before this action was triggered. Is it possible to show a warning/error message with the value entered?

Thank you!

Kalista Angeline

Solution

Hi @Kalista Angeline J,


We don't support that by default, but maybe you can achieve that using the Wijmo Flexgrid's cellEditEnding.


Using the Data Grid's OnInitialize event, you can use the API to set some additional handler with the logic you pretend:


Best regards,

Bernardo Cardoso

Hi @Bernardo Cardoso 

Thanks for your reply. We tried the suggested approach and getting 'flex.getcelldata is not a function' error

Hi @Kalista Angeline J,


Can you share an oml with that error, please?


Best regards,

Bernardo Cardoso



Hi @Kalista Angeline J 

I tried a similar approach as described by @Bernardo Cardoso and it worked as expected, without any similar error to the one you mentioned

Best Regards,
GM

Hi @Gonçalo Martins , @Bernardo Cardoso 

Attached oml for your reference.

Thank you!

Kalista Angeline


DataGrid_MaxValidation.oml

Hi @Kalista Angeline J,

You have a typo on the JavaScript Node. The Method should be getCellData, not getcelldata.


Best regards,

Bernardo Cardoso

Hi @Bernardo Cardoso

Thanks for the reply. It's working now

Regards,

Kalista Angeline

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.