Skip to main content
10-Marble
September 13, 2023
Question

Editing and saving grid data

  • September 13, 2023
  • 1 reply
  • 2646 views

I want to save the data I bound to the grid while some (not all)  rows users can edit.

I need to save both edited and unedited rows. currently, I'm getting only those rows that are edited. I need all the grid data. My Thingworx version is 9.3.3-b20.

if anyone know how to achieve it please help.

 

 

 

1 reply

22-Sapphire I
September 13, 2023

Since you are populating the grid, that means you know the 'original state' then you combine that with the 'edited rows'

You should be able to use the infotable functions or if the data is in a datatable, you can use datatable functions for that server side.

After that you can return the new full grid set.

GAjey10-MarbleAuthor
10-Marble
September 13, 2023

I thought the same solution for it but iterating over info table data , recognizing edited rows then replacing those seems not efficient. can you please help if you know any info table function that can do it efficiently or with fewer lines of code? I tried the OOTB snippet "Union" but it doesn't work.

22-Sapphire I
September 14, 2023

You'll have to doublecheck, but I think a DataTable supports 'Update Query' I don't remember if that is possible for an infotable as well (or the other way around).