Skip to main content
1-Visitor
March 2, 2019
Solved

Manipulate a row by buttons

  • March 2, 2019
  • 1 reply
  • 1927 views

image001 (2).pngI'm trying to change the status field in one row or multiple rows by clicking the button above. For example, if I selected row 3, then I click the "Approve" button, the status field should become "Approve". The field Status in my data shape is  string type, and I plan to write a service to overwrite the status of a row every time I click the button.  

I'm trying to do so, but I'm confused about what should I pass in as a parameter for my service, what should I return. Is there any built-in services that can overwrite a field of a data shape inside a data table. 
Thanks!

Best answer by PaiChung

Since you are updating a String with a String I don't see the need for a changing datashape (the data shape defines the base types per column)

You could use the Selected Row of the source to pass that to a service which identifies which row is being updated, update that row at the source and upon Service Invoke complete call the updated data.

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
March 4, 2019

Since you are updating a String with a String I don't see the need for a changing datashape (the data shape defines the base types per column)

You could use the Selected Row of the source to pass that to a service which identifies which row is being updated, update that row at the source and upon Service Invoke complete call the updated data.

duc_vuu1-VisitorAuthor
1-Visitor
March 5, 2019

Great, I got it to work. Thanks PaiChung

duc_vuu1-VisitorAuthor
1-Visitor
March 5, 2019

Just a quick question. How can I pass the selected rows to my service? I'm using regurlar grid, I couldn't find that option