title: Nested if condition in kendo grid column template
body: <p>While trying to implement condition function in kendo grid column template, there is a problem happening, data from my grid are not shown, my function is</p>
  
  <pre><code>function material() {
    if (PCommonPortalMethods.GetSiteLanguage() == 'en') {
      if (data.Unit._Key) {
        Unit.UnitGlobalName
      }
      else ('')
    }
    else {
      if (data.Unit._Key) {
        Unit.UnitLocalName
      }
      else ('')
    }
  }      
  </code></pre>
  
  <p>and I call it from template like :         <code>template:'#= material() #'</code></p>
  
  <p>I tried something like that also:</p>
  
  <pre><code>template: "#if (PCommonPortalMethods.GetSiteLanguage() == 'en') {# if(data.Unit._Key) #=Unit.UnitGlobalName#  else(" ") #} else { # if(data.Unit._Key) #=Unit.UnitLocalName#  else(" ") #} #"
  </code></pre>
  
  <p>can someone help me? what am I doing wrong? Thanks</p>