Hi, can someone show me the proper syntax for multiple if else-if, else statement inside the ClientsideTemplate of the Kendo Grid?
This is a snippet from where my code is breaking (I think....)
columns.Bound(d => d.FileExtension).ClientsideTemplate(
"# if (FileExtension == true) { #" +
"<img src='pdf.png' alt='' />" +
"# } else if (FileExtension == '.docx') { #" +
"<img src='word.png' alt='' />" +
"# } else { #" +
"<div> </div>" +
"# } #"
)
The code breaks and getting errors on kendo.all.min.js file. So, I'm not even really sure if my syntax is correct to begin with... =) Thanks very much and I look forward to the response.
Romel
This is a snippet from where my code is breaking (I think....)
columns.Bound(d => d.FileExtension).ClientsideTemplate(
"# if (FileExtension == true) { #" +
"<img src='pdf.png' alt='' />" +
"# } else if (FileExtension == '.docx') { #" +
"<img src='word.png' alt='' />" +
"# } else { #" +
"<div> </div>" +
"# } #"
)
The code breaks and getting errors on kendo.all.min.js file. So, I'm not even really sure if my syntax is correct to begin with... =) Thanks very much and I look forward to the response.
Romel