[Data Grid] How to get and set values from DataGrid

Forge Component
Published on 3 Aug (6 days ago) by OutSystems R&D
38 votes
Published on 3 Aug (6 days ago) by OutSystems R&D


I want to place a button on a DataGrid column, calculate the value of two columns and set the calculated value to another column.

There is a hand to recalculate with OSCellRenderer when the value is changed, but this time there is a customer requirement to use the button.

Since the names of the two columns you want to calculate are fixed, I think that you can get two values with panel.getCellData (row, column) ;, but I don't know how to get the DataGrid Row.

Up to the creation of the button was done as shown in the sample, and ScreenAction could be called.

How can I get and calculate the value of DataGrid and set it?


I solved it myself.

Since I found setCellValue in GridFramework.js, I implemented it using this.