cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Manipulate a row by buttons

duc_vuu
5-Regular Member

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!

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:duc_vuu)

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.

View solution in original post

4 REPLIES 4
PaiChung
22-Sapphire I
(To:duc_vuu)

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_vuu
5-Regular Member
(To:PaiChung)

Great, I got it to work. Thanks PaiChung

duc_vuu
5-Regular Member
(To:duc_vuu)

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 

PaiChung
22-Sapphire I
(To:duc_vuu)

All selections are passed in from the Data Source.

So if you look at the right side, the services, it will show the name of the service and have a Data section which has All Data (tied to the Grid) and Selected Row(s)

Dragging that drags a full row, if you needed an individual field value, you'd expand it and drag a field.

Top Tags