Read and Write Values from Jquery Datatable -
I am dynamically generating an HTML table and after that, to increase the attributes of my html table, DataBable 1.9 4 am using the plugin. My table looks like below
< P> "X" checkboxes, I'm trying to select the checkbox in relation to a particular line and column combination. I have values in values like pair (VALUE1, col3), then I have to select that particular cell, I read the checkbox text from the header row and tried to select the same checkbox but no luck.
How should I proceed with this? I know that there are some ways of datatable, but not very well aware of them.
You have to tell how exactly you generate those checkboxes, the following is the fact that How do I do this? The checkbox is in any data or there is actually no difference between anything
Some examples of this concept are working: See Action in this Bella above - & gt; (var row = 1; row & lt; = 10; line ++) {dataTable.fnAddData (['& lt; input type =' Checkbox "id =" check _ '+ row +' _ 1 "& gt; ',' & lt; input type =" checkbox "id =" check _ '+ row +' _ 2 '& gt;', '& Lt; input type = "checkbox" id = "check _ '+ row +' _ 3" & gt; ','
function dtCheckBox (line, color) {return document. GetElementById ('check _' + row + '_' + cola); }
// setter example, 20 Check the random checkbox (Var i = 0; i & lt; 20; i ++) {var row = Math.flur (Math.Random) * 10) +1, col = Math.floor (Math.Rendam) * 4) +1; DtCheckBox (line, cola). Checked = true; } // getter, for example, console the checked status of all checkboxes (col = 1; col & lt; = 4; col ++) {for (line = 1; row & lt; = 10; row ++ ) {Console.log (dtCheckBox (line, col) .checked); }}
Comments
Post a Comment