fnRender checkbox onclick function not being called
fnRender checkbox onclick function not being called
Hi All,
I'm using fnRender to add a checkbox to each row. Looking at the dom generated it looks correct to me:
[code]
[/code]
However, the function is not invoked which the checkbox is clicked (using an alert to test). Am I missing something obvious? I want to use the function to update the checked status for server-side processing.
Thanks,
Jim
I'm using fnRender to add a checkbox to each row. Looking at the dom generated it looks correct to me:
[code]
[/code]
However, the function is not invoked which the checkbox is clicked (using an alert to test). Am I missing something obvious? I want to use the function to update the checked status for server-side processing.
Thanks,
Jim
This discussion has been closed.
Replies
I'm doing almost the same thing (in my case
Regarding " aLayout[0] is undefined at line 5913" - that is typically because the elements in the thead and tbody don't match. Perhaps you can post your HTML if that doesn't help.
Allan
The checkboxes work when connecting remotely so I'm not too concerned that they don't work when running a browser on the server. The fact that both of the tables render correctly in IE8 without the aLayout[0] error would indicate to me that the thead and tbody elements match. I have an empty tag in the basic markup and I have tried adding a dummy row which didn't help. The only error I see in FireBug when I open the page is the aLayout[0] error. Below is the relevant code/markup for one of the tables. Since the application is currently limited to running in IE anyway I'm not going to spend too much time on this issue but it would be nice for debugging ...
Thanks,
Jim
[code]
"aoColumns":
[
{ "sName": "ID", "bVisible": false },
{
"sName": "",
"sClass": "right",
"bSortable": false,
"fnRender": function( obj )
{
var sReturn;
var id = obj.aData[0];
if( obj.aData[ obj.iDataColumn ] == "Y" )
sReturn = '';
else
sReturn = '';
return sReturn;
},
"bUseRendered": false
},
{ "sName": "Column 2", "sClass": "left" },
{ "sName": "Column 3", "sClass": "center" },
{ "sName": "Column 4", "sClass": "left" },
{ "sName": "Column 5", "sClass": "center" },
{ "sName": "Column 6", "sClass": "right" },
{ "sName": "Column 7", "sClass": "center" },
{ "sName": "Column 8", "sClass": "center" },
{
"sName": "Column 9",
"sClass": "right",
"fnRender": function( obj )
{
var id = obj.aData[ 0 ];
var sReturn = "" + obj.aData[ obj.iDataColumn ] + "";
return sReturn;
},
"bUseRendered": false
}
],
ID
Column 2
Column 3
Column 4
Column 5
Column 6
Column 7
Column 8
Column 9>
[/code]
Jim