Posted By

SIDDIK142563 on 04/10/14


Tagged

ui Keno


Versions (?)

Conditional Statement in Kendo UI template


 / Published in: jQuery
 

Example of implementing Conditional (if else) statement in Kendo UI grid template.

  1. template:
  2. "# if (Photo != null) { #" +
  3. "<img class="+"photo" + " src=" + "@Url.Content(@"~/Documents/Userphoto/#=UserId #/#=Photo#")" + " width="+"70px"+" alt="+"image"+" />" +
  4. "# } else { #" +
  5. "<img class="+"photo" + " src=" + "@Url.Content(@"~/Documents/DefaultImage/profile-default.jpg")" + " width="+"70px"+" alt="+"image"+" />" +
  6. "# } #"

Report this snippet  

You need to login to post a comment.