BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<div id="Grid"></div>
<script type="text/javascript">
function format(value, proxy) {
var val = ej.parseFloat(value);
if (val < 80)
return '<span style="color: red">' + value + '</span>';
if (val >= 80 && val <= 100)
return '<span style="color: orange">' + value + '</span>';
if (val > 100)
return '<span style="color: green">' + value + '</span>';
}
$(function () {
var helpers = { formatting: format };//helpers
$.views.helpers(helpers);
$("#Grid").ejGrid({
dataSource: window.gridData,
allowPaging: true,
allowSorting: true,
showSummary: true,
allowGrouping: true,
summaryRows: [
{
title: "Sum",
summaryColumns: [{
summaryType: ej.Grid.SummaryType.Sum,
template: "{{:~formatting(#data['summaryValue'])}}",
displayColumn: "Freight", dataMember: "Freight",
format: "{0:C2}"
}]
}
],
columns: [
. ..
{ field: "Freight", format: "{0:C}" }
]
});
});
</script> |