fnFindCellRowIndexes/fnFindCellRowNodes Not Working
fnFindCellRowIndexes/fnFindCellRowNodes Not Working
Hello,
I am trying to use fnFindCellRowIndexes to find the row containing a string in column 1. I then want to highlight the row using fnDisplayRow. I have done this:
[code]
var idToFind = "UniqueStringSomewhereinColumn1";
var rowToHighlight = oTable.fnFindCellRowIndexes(idToFind);
//oTable.fnDisplayRow(oTable.fnGetNodes()[rowToHighlight]);
[/code]
I know that rowToHighlight returns an array, so the last line is probably not correct(can't pass an array of array to fnGetNodes). But my main problem is that rowtoHighlight is always empty! I debugged in firebug, and rowToHighlight always is [ ]. I tried fnFindCellRowNodes() as well, and it's the same result. I tried with and without passing the column number parameter.
I've included the API function code in js Files, and imported them. Not sure why these are not working. Am I using them incorrectly?
I am trying to use fnFindCellRowIndexes to find the row containing a string in column 1. I then want to highlight the row using fnDisplayRow. I have done this:
[code]
var idToFind = "UniqueStringSomewhereinColumn1";
var rowToHighlight = oTable.fnFindCellRowIndexes(idToFind);
//oTable.fnDisplayRow(oTable.fnGetNodes()[rowToHighlight]);
[/code]
I know that rowToHighlight returns an array, so the last line is probably not correct(can't pass an array of array to fnGetNodes). But my main problem is that rowtoHighlight is always empty! I debugged in firebug, and rowToHighlight always is [ ]. I tried fnFindCellRowNodes() as well, and it's the same result. I tried with and without passing the column number parameter.
I've included the API function code in js Files, and imported them. Not sure why these are not working. Am I using them incorrectly?
This discussion has been closed.
Replies
[code]
aData = oSettings.aoData[i]._aData;
[/code]
variable aData is undefined
can anyone tell me why?
Allan
The problem occurs in 1. table (alltasks)
-Teemu-
[code]
function findRowIndexUsingString(stringToCheckFor){
var rowIndex = null;
$.each(oTable.fnGetData(), function(i, dtRow) {
$.each(dtRow, function(j, dtCol) {
if (dtCol == stringToCheckFor) {
rowIndex = i;
}
});
});
return rowIndex;
}
[/code]
same for me fnFindCellRowIndexes does not work. I only get one item as result.
Worn