Open popup from grid row, send html string parameters to popup
I'm trying to create a popup using ClientFormatFunc but I need to pass string parameters and I'm having a problem with the format of the params.
I can do this with integer parameters but I'm getting errors with strings. I also need to send multiple parameters and wondered how that should be formatted.
Here's the ClientFormatFunc:
function openDetailsPopupFunc(compliance) {When I look at the elements that are being rendered in the browser, I can see that the proper values are being added to params, but I'm assuming that because they're string values and not enclosed in double quotes it's having problems.
return '<button type="button" class="awe-btn o-pad" onclick="awe.open(\'openDetailsPopup\', {params:{ driverId: '
+ compliance.DriverId + ', startDate: ' + compliance.ReportStartDate + ', endDate: ' + compliance.ReportEndDate + ' }}, event)">View</button>';
}
Sean Davidson
asked
at 15 Jan 2021
-
I presume you need to add a button to a grid row, as it is shown here: https://demo.aspnetawesome.com/GridDemo/CustomFormat ?at 15 Jan 2021 Omu
-
Thanks, I was able to follow the info on the CustomFormat page for the detailsBtnFormat and got the values to come across to the controller.at 15 Jan 2021 Sean Davidson