Reputation: 328
I have a Calculated Model which generates records based on a query. When I click the update button I want to pull the Certificate_ID Value in the same row as the Update Button. First thing I have tried to do is return the index of the row using by attaching the following code to the Update Button's on click event. Tried using the below code, but not getting the desired result.
Returns the position of the of the button in the row:
var index = widget.childIndex;
Returns blank on the first button and returns 1 for the second button:
var index = widget.parent.childIndex;
Upvotes: 0
Views: 186
Reputation: 1831
For calculated datasources you are still able to use:
widget.datasource.item.YourField
in a button onClick event to get a value from the button click.
Upvotes: 1