Ammm, i found the solution myself. Maybe it will be usefull for somebody(javascript newbies like me+_+), who is using MVC3.
So, the problem is that fnGetColumnData function returns not the needed value, but the full html(i.e Some value ) To be able to filter correctly, function must return just "Some value". So i`v changed the code like this:
[code]
for (var i = 0, c = aiRows.length; i < c; i++) {
iRow = aiRows[i];
sValue = $('' + this.fnGetData(iRow, iColumn) + '').text();
// ignore empty values?
if (bIgnoreEmpty == true && sValue.length == 0) continue;
Replies
The hyperlinks are staying on one line and there is no space between them.
Also, the filter boxes are going down the page and not across the page like the example.
http://datatables.net/forums/discussion/11991#Item_1
Does anyone knows how to get ColumnFilterWidgets working when using fnRender function to display not just value, but some kind of html like this:
[code] "aoColumns": [
{
"sName": "User",
"mDataProp": "User",
"fnRender": function (oObj) { return '' + oObj.aData[oObj.oSettings.aoColumns[oObj.iDataColumn].mDataProp] + '' ; }
},
[/code]
When using filter all records just dissapear. Common sorting works perfectly, but filtering does not. Any suggestions?
So, the problem is that fnGetColumnData function returns not the needed value, but the full html(i.e Some value ) To be able to filter correctly, function must return just "Some value". So i`v changed the code like this:
[code]
for (var i = 0, c = aiRows.length; i < c; i++) {
iRow = aiRows[i];
sValue = $('' + this.fnGetData(iRow, iColumn) + '').text();
// ignore empty values?
if (bIgnoreEmpty == true && sValue.length == 0) continue;
// ignore unique values?
else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -1) continue;
// else push the value onto the result data array
else asResultData.push(sValue);
}
[/code]
$.text allows us to ignore html and get only text value. In the result filtering goes well. Enjoy.