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

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

angular - DownloadURL return null in below code -