Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147669 | Sep 19,2019 08:02 AM UTC | Sep 24,2019 09:52 AM UTC | jQuery | 3 |
![]() |
Tags: ejGrid |
<script type="text/x-jsrender" id="columnTemplate">
<span class="label label-warning></span>
</script>
<div id="Grid"></div>
<script type="text/javascript">
$(function () {
// the datasource "window.gridData" is referred from jsondata.min.js
var data = ej.DataManager(window.gridData).executeLocal(ej.Query().take(50));
$("#Grid").ejGrid({
dataSource: data,
allowPaging: true,
allowSorting: true,
isResponsive: true,
columns: [
{ headerText: "RowIndex", template: true, templateID: "#columnTemplate", textAlign: "center", width: 110 },
. . .
],
templateRefresh:"refresh",
});
});
function refresh(args) {
Index = (this.model.pageSettings.pageSize * (this.model.pageSettings.currentPage-1)) + args.rowIndex + 1;
$(args.cell).find("span").text(Index);
}
</script> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.