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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -