ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Open popup from grid row, send html string parameters to popup
Title:
B
I
{code}
?
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) { 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>'; } 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.
Save Changes
Cancel
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
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK