c# - 2 decimal places in web grid for mvc - need total value to display value with 2 decimal places -



c# - 2 decimal places in web grid for mvc - need total value to display value with 2 decimal places -

2 decimal places in web grid mvc - need total value display value 2 decimal places

@grid.gethtml( tablestyle: "table", fillemptyrows: true, headerstyle: "header", footerstyle: "grid-footer", mode: webgridpagermodes.all, columns: new[] { grid.column(columnname: "selfbillinvoicenumber", header: "invoice number"), //the model fields display grid.column(columnname: "selfbillitemtotalvalue", header: "total value") })

without knowing type of selfbillitemtotalvalue property, can recommend this:

grid.column( columnname: "selfbillitemtotalvalue", header: "total value", format: item => item.tostring("#.##") )

c# asp.net-mvc webgrid

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -