rowGrouping: _fnDrawCallBackWithGrouping Issue?
rowGrouping: _fnDrawCallBackWithGrouping Issue?
I think I have found an issue with this function or maybe it is something in my logic or maybe its because I am a newbie. I have a button that when clicked performs an Ajax JSON call to the server and loads my DataTable. I then apply the rowGrouping function:
[code]
$.ajax({
'type': "POST",
'url': "123fakeurl",
'data': JSON.stringify(wrap),
'contentType': "application/json; charset=utf-8",
'dataType': "json",
'success': function(data) {
if (data.d.indexOf("major.err:") > -1) {
// Major Error
showMessage("#FFFF99", data.d.replace("major.err:", ""));
} else {
if (data.d.indexOf("warn:") > -1) {
// Warning
showMessage("#FFFF99", data.d.replace("warn:", ""));
} else {
if (data.d.indexOf("err:") > -1) {
// Error
showMessage("#FF9999", data.d.replace("err:", ""));
} else {
// Success
oTable.fnClearTable();
for (var itm in eval(data.d)) {
var nNode = oTable.fnAddData([
eval(data.d)[itm].cIdx0,
"",
eval(data.d)[itm].cIdx2,
eval(data.d)[itm].cIdx3,
eval(data.d)[itm].cIdx4,
eval(data.d)[itm].cIdx5,
eval(data.d)[itm].cIdx6,
eval(data.d)[itm].cIdx7,
eval(data.d)[itm].cIdx8,
eval(data.d)[itm].cIdx9,
eval(data.d)[itm].cIdx10,
eval(data.d)[itm].cIdx11,
"$" + eval(data.d)[itm].cIdx12,
eval(data.d)[itm].cIdx13
]);
var nTr = oTable.fnGetNodes(nNode[0]);
$(nTr).attr("id", "rowMod" + eval(data.d)[itm].cIdx0);
}
oTable.rowGrouping({ iGroupingColumnIndex: 5 });
}
}
}
},
'error': function(data) {
showMessage("#FFFF99", data.d);
},
'complete': function() {
}
});
[/code]
When I step through the logic it appears that every time that I click on the button it increases the amount of times that the _fnDrawCallBackWithGrouping is called.
Initial Click - function called 1 time
2nd Click - function called 4 times
3rd Click - function called 7 times
Any help with this would be greatly appreciated. Thanks in advance for looking into this.
[code]
$.ajax({
'type': "POST",
'url': "123fakeurl",
'data': JSON.stringify(wrap),
'contentType': "application/json; charset=utf-8",
'dataType': "json",
'success': function(data) {
if (data.d.indexOf("major.err:") > -1) {
// Major Error
showMessage("#FFFF99", data.d.replace("major.err:", ""));
} else {
if (data.d.indexOf("warn:") > -1) {
// Warning
showMessage("#FFFF99", data.d.replace("warn:", ""));
} else {
if (data.d.indexOf("err:") > -1) {
// Error
showMessage("#FF9999", data.d.replace("err:", ""));
} else {
// Success
oTable.fnClearTable();
for (var itm in eval(data.d)) {
var nNode = oTable.fnAddData([
eval(data.d)[itm].cIdx0,
"",
eval(data.d)[itm].cIdx2,
eval(data.d)[itm].cIdx3,
eval(data.d)[itm].cIdx4,
eval(data.d)[itm].cIdx5,
eval(data.d)[itm].cIdx6,
eval(data.d)[itm].cIdx7,
eval(data.d)[itm].cIdx8,
eval(data.d)[itm].cIdx9,
eval(data.d)[itm].cIdx10,
eval(data.d)[itm].cIdx11,
"$" + eval(data.d)[itm].cIdx12,
eval(data.d)[itm].cIdx13
]);
var nTr = oTable.fnGetNodes(nNode[0]);
$(nTr).attr("id", "rowMod" + eval(data.d)[itm].cIdx0);
}
oTable.rowGrouping({ iGroupingColumnIndex: 5 });
}
}
}
},
'error': function(data) {
showMessage("#FFFF99", data.d);
},
'complete': function() {
}
});
[/code]
When I step through the logic it appears that every time that I click on the button it increases the amount of times that the _fnDrawCallBackWithGrouping is called.
Initial Click - function called 1 time
2nd Click - function called 4 times
3rd Click - function called 7 times
Any help with this would be greatly appreciated. Thanks in advance for looking into this.
This discussion has been closed.