/ Published in: jQuery

Example of implementing Conditional (if else) statement in Kendo UI grid template.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
template: "# if (Photo != null) { #" + "<img class="+"photo" + " src=" + "@Url.Content(@"~/Documents/Userphoto/#=UserId #/#=Photo#")" + " width="+"70px"+" alt="+"image"+" />" + "# } else { #" + "<img class="+"photo" + " src=" + "@Url.Content(@"~/Documents/DefaultImage/profile-default.jpg")" + " width="+"70px"+" alt="+"image"+" />" + "# } #"
Comments
