Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
8920
igGrid templating
posted

Here simple column with template :

key: 'Audit',
unbound: true,
headerText: 'Audit',
template: '<span class="auditButton" onclick="uoaAuditSet(${ig_pk})" ></span>',
width: '10%'

which renders the following :

<span class="auditButton" onclick="uoaAuditSet(cc9568eb-8195-40c1-9c1d-045bb91dcc81)"></span>  

Question : Is there a way to add quotation to the template output so the outcome will be :

<span class="auditButton" onclick="uoaAuditSet('cc9568eb-8195-40c1-9c1d-045bb91dcc81')"></span>

thanks

Parents
No Data
Reply
  • 17590
    Verified Answer
    Offline posted

    Hello mcseidel,

    In order to add quotation marks (or any other special characters) in strings they have to be escaped. In your scenario if you would like to add a pair of quotations they should be escaped as following: \"\"

    Some further reference about special characters and escaping could be fpund ta the following link:

    https://msdn.microsoft.com/en-us/library/2yfce773(v=vs.94).aspx

    Please test my suggestion on your side and let me know if you need any further assistance with this matter.

Children
No Data