Kendo mvc grid template format -


my application mvc5 c#; using kendo mvc grid, need format currency item.

 columns.bound(p => p.isfree).template(@<text> @if (item.isfree)             {                 <span>free</span>             }             else             {                 <span>@item.price </span>              }</text>).title("cost"); 

could not find documentation how format @item.price currency.

you can use clienttemplate instead of template if else condition below

columns.bound(c => c.isfree).clienttemplate("# if(isfree) {#  <span>free</span> #} else{# <span>#= kendo.tostring(price, 'c') #</span> #}#").title("cost") 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -