title: Get clicked Radio Button Values from all the row
body: <p>I have a grid (dhtmlx) with lots of rows. What I am trying to achieve is to get all the values of clicked radio button of each row plus the row id separated by comma and put it into an input box ? The row ids and radio button values are separated by :</p>
  
  <p>The row ids are automatically generated in this format 110014742~01~01</p>
  
  <p>rowId:radioBtnValue, rowId:radioBtnValue, rowId:radioBtnValue</p>
  
  <p>13004238~01~01:02, 110012178~01~01:05, 110014742~01~01:03 --> inside the input box when the radio buttons are clicked.</p>
  
  <p>The column that contains all the radio button and its header had an id of rbBtn_sel</p>
  
  <p>There will be another button when it is clicked will take the values from the input box and save it.</p>
  
  <pre><code>function DoRowSaveConfig()  {
   var colIndex=mygrid.getColIndexById("rdBtn_sel");
   var radioBtn = mygrid.getCheckedRows(colIndex);
   var  CommaCount = radioBtn.split(",").length - 1 ;
   for (var i= 0; i&lt;radioBtn.length; i++)
   if (radioBtn[i].checked) {
   var selectedVal = radioBtn[i].value;
               document.getElementById('an.ret.sys.4.').value = selectedVal;
               document.getElementById('an.ret.sys.5.').click();
               } 
               }
                return false;
         };
  </code></pre>
  
  <p>Maybe Jquery will have a better solution. Open to it.</p>
  
  <p><a href="http://jsfiddle.net/19eggs/ep6JE/" rel="nofollow noreferrer">http://jsfiddle.net/19eggs/ep6JE/</a></p>
  
  <p><img src="https://i.stack.imgur.com/W5Gae.gif" alt="How the table/grid structure with column id"></p>
  
  <p>/**********EDIT**************/</p>
  
  <p>Thanks all, and it works as expected but I may have mislead you. Upon clicking the radio button it needs to get the value of the row id not id(second col). Updated the image.</p>
  
  <p>Row ids are automatically generated in this format 110012178~01~01. Also we are using xml and DHTMLX grid will automatically convert to a table.</p>
  
  <pre><code>&lt;rows&gt;&lt;row id="13004238~01~01"&gt;&lt;cell&gt;James Brown&lt;/cell&gt;
  &lt;cell&gt;12545&lt;/cell&gt;
  &lt;cell&gt;&lt;![CDATA[&lt;div class="rd"&gt;&lt;input type="radio" name="130042380101" value="00"&gt;&lt;/div&gt;
  &lt;div class="rd"&gt;&lt;input type="radio" name="1100121780101" value="01"&gt;&lt;/div&gt;
  &lt;div class="rd"&gt;&lt;input type="radio" name="130042380101" value="02"&gt;&lt;/div&gt;
  &lt;div class="rd"&gt;&lt;input type="radio" name="130042380101" value="03"&gt;&lt;/div&gt;
  &lt;div class="rd"&gt;&lt;input type="radio" name="130042380101" value="04"&gt;&lt;/div&gt;
  &lt;div class="rd"&gt;&lt;input type="radio" name="130042380101" value="05"&gt;&lt;/div&gt;
  &lt;div class="rd"&gt;&lt;input type="radio" name="130042380101" value="06"&gt;&lt;/div&gt;]]&gt;
  &lt;/cell&gt;
  &lt;/row&gt;\&lt;/rows&gt;'; 
  </code></pre>