Possible BUG with radio buttons
Possible BUG with radio buttons
BLacKR1D3R
Posts: 2Questions: 0Answers: 0
Good day
First, sorry for my English ;)
ok, i have a datatable with a radio button group in a column, the data for the table are provided dynamic through jsp table bean.
The bug happens in this situation, if i have a radio button with values long to 2 chars, and have the checked attribute, the datatable don't draw the radio button checked but all the others attributes and data, it so weird, I tested already datatables 1.5.2, the data isolated in a single html, and clean css
nothings works
even i take the zero config example for the latest version and replace the data with my data don't work well
in the attached file u find this last try (zero config with my data), if you disabled the plugin the table works well, if u active dont
(NOTE its a old app, dont blame me for the html code xD)
ATTACHED: http://www.megaupload.com/?d=NRJCWQUK
thanks in advance
First, sorry for my English ;)
ok, i have a datatable with a radio button group in a column, the data for the table are provided dynamic through jsp table bean.
The bug happens in this situation, if i have a radio button with values long to 2 chars, and have the checked attribute, the datatable don't draw the radio button checked but all the others attributes and data, it so weird, I tested already datatables 1.5.2, the data isolated in a single html, and clean css
nothings works
even i take the zero config example for the latest version and replace the data with my data don't work well
in the attached file u find this last try (zero config with my data), if you disabled the plugin the table works well, if u active dont
(NOTE its a old app, dont blame me for the html code xD)
ATTACHED: http://www.megaupload.com/?d=NRJCWQUK
thanks in advance
This discussion has been closed.
Replies
line 3020 approx
$("#table").dataTable({
"sScrollY": "170px",
"aoColumns": [{"fnRender": function(oObj) {
return "";
}]
});
removing: "sScrollY": "170px", the default checked radio button will work.
[code]
$(document).ready(function() {
$('#example').dataTable( {
"sScrollY": "200px",
"bPaginate": false,
"aoColumnDefs": [
{
"fnRender": function(oObj) {
return "";
},
"aTargets": [ 0 ]
}
]
} );
} );
[/code]
The last (and only the last) radio button is marked as checked - since they are all in the same group there can only be one checked.
Allan
In Firefox this can be fixed using '$('input', nTd).each( function () { this.name += "_clone"; } );' inserted into line 5359 in DataTables 1.7.5, but for some reason that I can't quite fathom this doesn't work in Webkit. More investigation is required there I think.
For the moment you can disable auto width, and just assign widths to the columns manually. Thanks for letting me know about this one.
Allan