Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Amrish on Apr 16, 2009 06:58
open dhtmlx forum
Reg. Radio buttons And Check boxes

hi,

Please tell me how to use radio buttons and check boxes in dhtml grid. as i have to incorporate it in the first column of my grid.

My code is as below



xmldata = xmldata+"<row><cell type="ro"><![CDATA[First<input type="radio"> Second <input type="radio">]]></cell><cell><![CDATA["+ journal_name +" ]]></cell><cell><![CDATA[ "+article_title+"]]></cell><cell><![CDATA[ "+ author_name +" ]]></cell><cell><![CDATA["+ issue +" ]]></cell><cell><![CDATA["+ year +" ]]></cell><cell><![CDATA["+ volume +" ]]></cell><cell><![CDATA["+ start_page +" ]]></cell><cell><![CDATA["+ end_page +" ]]></cell></row>";
        
    
    
    
    
    }while(rs.next());
        }else{
            xmldata=null;
        
        }
            }
catch (SQLException ex)
{
System.err.println(ex.getMessage());
}finally{
        if(rs!=null)
        rs.close();
    if(stmt!=null)
        stmt.close();
    if(con!=null)
        con.close();
    }
query = query.replaceAll("\\+","plus;");

%>
    
    <% if(xmldata!=null) { %>
    <table width="100%" height="90%">
        <tr>
            <td width="100%" valign="top">
                <div id="gridbox" width="100%" height="100%" style="background-color:'#E3E5DA';overflow:hidden"></div>
            </td>
            
        </tr>

    </table>
<script>
    mygrid = new dhtmlXGridObject('gridbox');
    mygrid.hdrSizeA = 1000;
    mygrid.hdrSizeB = 1000;
    mygrid.hdrSizeC = 1000;
mygrid.setImagePath("imgs/");

    mygrid.setSkin("dark");
    mygrid.enableRowsHover(true,'grid_hover')
    mygrid.init();
mygrid.enableMultiline(true);
    mygrid.parse('<?xml version="1.0" encoding="UTF-8"?><rows><head> <column width="100" type="link" align="left" sort="str">Select </column> <column width="100" type="link" align="left" sort="str">Journal Name</column> <column width="288" type="link" align="left" sort="str">Article Name</column> <column width="93" type="link" align="left" sort="str">Author Name</column> <column width="53" type="link" align="left" sort="str">Issue</column><column width="53" type="link" align="left" sort="str">Year</column><column width="53" type="link" align="left" sort="str">Volume</column><column width="53" type="link" align="left" sort="str">Start Page</column><column width="53" type="link" align="left" sort="str">End Page</column> </head><%=xmldata%></rows>');


By using radio button code also it is not working.

Thanks and regards

Answer posted by dhxSupport on Apr 16, 2009 07:50

>>By using radio button code also it is not working

Please describe how doesn't this code work?