I need to have a generic "Delete confirmation" pop up and dynamically bind data source to the pop up using event fired before pop-up is appeared.
Popup will be appeared on clicking the delete icon on "Location" Page (screenshot bellow). I need to set the data source of the popup at the same time. (when user click on this delete icon) and record has to be deleted when user click on "Delete" button on the popup.
This is the code I have currently for the onclick event of the delete icon above
app.popups.ItemDeleteConfirmationDialog.descendants.Content.datasource = widget.datasource;
app.popups.ItemDeleteConfirmationDialog.descendants.ConfirmButton.datasource = widget.datasource;
app.popups.ItemDeleteConfirmationDialog.visible=true;
And this is what I have for the onClick button of the pop-up
widget.datasource.deleteItem();
Please help me to get this resolved. Thank you.