Paging is disabled..? Enable paging

Paging is disabled..? Enable paging

phanivvkphanivvk Posts: 1Questions: 1Answers: 0

Can any one help me in fixing paging in the below code. I used array based binding for database.
I'm creating a dynamic column called "Action", after creating table rendered perfectly with all the records but paging is disabled.

var cols = [
{ "mDataProp": "Id", sTitle: "Id", sType: "number", visible: false },
{ "mDataProp": "CouponValue", sTitle: "CouponValue", sType: "number", visible: false },
{ "mDataProp": "CouponName", sTitle: "Name", sType: "boolean", width: "90%" },
{ "mDataProp": "Action", sTitle: "Action", sType: "string" },
];
var data_table;
var gvCoupons = '#gvCoupons';
Krafty.RenderGrid = function (response) {
for (var i = 0; i < response.length; i++) {
response[i]["Action"] =
'<input type="image" id="btnEdit" data-value=' + response[i]["Id"] + ' src="Resources/ActionButton/edit.png" style="width:24px;height:24px;margin-right:10px;" title="Edit" />' +
'<input type="image" id="btnDelete" data-value=' + response[i]["Id"] + ' src="Resources/ActionButton/delete.png" style="width:24px;height:24px;margin-right:10px;" title="Delete" />';
}

data_table = $(gvCoupons).dataTable({
    "bSort": false,
    "bFilter": true,
    "aaData": response,
    "aoColumns": cols,
    "bPaginate": true
});

Don't not why paging got disabled.

Answers

  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin

    Please link to a test page showing the issue, as per the forum rules.

    Allan

This discussion has been closed.