478
Views
5
Comments
Solved
[OutSystems Data Grid] [Autogenerated Columns] Set cell data by binding/header name?
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hi, in auto generated columns mode (because I need to work on multiple templates), how can I set cell data without ColumnID, instead using binding/header name?


Is that possible using Javascript, please let me know how to do it.

Thanks.

2020-08-05 09-00-16
Gabriel Lundgren
Solution

Hey Harlin,


I created a sample that has a button calling this JS node. 


Notice we are using the column binding to retrieve the column.

I've attached the sample so you can take a look.

Please bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases.

Please let us know if this helps.

 

Best regards,

Gabriel Lundgren

SetCellData.oml
2020-08-05 09-00-16
Gabriel Lundgren

Hey Harlin,


Just to make sure I understood you correctly, you want to set cell data after the grid has been initialized?

2024-03-25 06-19-08
Harlin Setiadarma

Correct. 

2020-08-05 09-00-16
Gabriel Lundgren
Solution

Hey Harlin,


I created a sample that has a button calling this JS node. 


Notice we are using the column binding to retrieve the column.

I've attached the sample so you can take a look.

Please bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases.

Please let us know if this helps.

 

Best regards,

Gabriel Lundgren

SetCellData.oml
2024-03-25 06-19-08
Harlin Setiadarma

Thanks, it works nicely if I use API/ArrangeData server action.
Just out of curiosity, I tested using JSONSerialize, it didn't have any columns generated.

I tested using JSONSerialize, because it works for client-side local variable data list, eg: data from REST API.

Also, any clue on how to manipulate row checkbox? (OOT)

2025-03-05 10-16-14
Suriyakala S

Is it Possible to set cell data using column id? If yes can you provide me the updated js code?

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