164
Views
2
Comments
Solved
[OutSystems Data Grid] How to set maxLength for TextColumn
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hi Everyone

As the title, I whan to limit maxLength of TextColumn when it can be input.

How can I achieve this.

Regards,


2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Tom,

For the mentioned requirement, one of the approach is to..

  • Define a reusable global client action with ColumnId & MaxLength as input parameter.
  • Define a Javascript node in the client action flow and execute the below JS

JS Snippet:

Approach 1:

OutSystems.GridAPI.ColumnManager.GetColumnById($parameters.ColumnId).provider.maxLength = $parameters.ColumnMaxLength;


Approach 2:

OutSystems.GridAPI.GridManager.GetGridById($parameters.GridId).provider.columns.getColumn($parameters.ColumnBinding)._maxLen = $parameters.ColumnMaxLength;


I hope this helps you!


Kind regards,

Benjith Sam

2021-01-19 14-07-32
Tom Zhao

Hi @Benjith Sam 

Thanks, It works for me.

Sorry, I have another question. I want to add a row duplicate from the selected row, how can I do this?

Best Regards,

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