Skip to main content
Mar 2, 2019 6:59 AM UTC
Solved

Manipulate a row by buttons

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!

PaiChungAnswer
Mar 4, 2019 9:08 PM UTC

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.

4 replies

PaiChungAnswer
Mar 4, 2019 9:08 PM UTC

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_vuuAuthor
Mar 5, 2019 11:04 PM UTC

Great, I got it to work. Thanks PaiChung

duc_vuuAuthor
Mar 5, 2019 11:09 PM UTC

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