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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -