<script type="text/javascript">
$(function () {
$("#Grid").ejGrid({
dataSource: window.gridData,
allowSorting :true,
allowPaging:true,
load : function (args) {
for (var i = 0 ; i < this.model.columns.length; i++) {
if (ej.isNullOrUndefined(this.model.columns[i].allowSorting)) {
this.model.columns[i].headerTemplateID = "#datetemplate";
}
}
},
create : function(args) {
var headers = this.getHeaderTable().find(".e-headercelldiv");
for (var i = 0 ; i < headers.length; i++) {
if(headers.eq(i).parent().hasClass("e-headertemplate"))
headers.eq(i).prepend("<span style='float:right'>" + headers.eq(i).attr("data-ej-mappingname") + "</span>")
}
},
isResponsive: true,
columns: [
{ field: "OrderID", headerText: "Order ID", isPrimaryKey: true, textAlign: ej.TextAlign.Right, width: 75 }, . . .
]
});
});
</script>
<script id="datetemplate" type="text/x-jsrender">
<span class="date e-headericon"></span>
</script>
|