Radio Buttons

Hi,





I want to display two radio buttons in single column along with some values beside them for example: for gender column i want to get 2 radio buttons with male and female. On selecting the radio buttons i need to get the selected value male or female…



can you please help me…



thanks in advance

haritha






You can create your own eXcell for this. MOre details can be found here: dhtmlx.com/docs/products/dht … 2076141000). It has two states represented by two different images and text labels. Changing text (for example) from “Yes” to “Male” and “No” to “Femail” in the code you can get what you need. acheck type is defined in /codebase/excells/dhtmlxgrid_excell_acheck.js file.



Or, you can use existing radibuttons type (ra) in two columns. These two columns can be joint under one header if you use colspan (#cspan) in grid header.

Hi,

Thanks for you support.
I am displaying check boxes in a column. By default they are getting checked and check box is also not getting displayed. So i wrote the following function:

function doAfterInit()
    {
        myGrid.setImagePath(“codebase/imgs/”);
         myGrid.forEachRow(function(id){
       
           if (myGrid.cells(id,0).getValue()==1)
        {
            myGrid.cells(id,0).setValue(0);
        }
    });
  }

Is there any API method to make the checkboxes unchecked by default.

Thanks
haritha

When you create row in grid you can set value for checkbox - 1 - checked, 0 - not checked.  This should work irregardless to the way you create row - script, xml or any other.