Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sandip on Jan 19, 2009 22:14
open dhtmlx forum
abt horizontal radio button

Dear sir,

I saw the example of horizontal radio button
mygrid.setRowExcellType("1","ra_str");
mygrid.setRowTextStyle("1","text-align:center");

It is not working in my case. I provide you my code snippet.
newGrid.init();
newGrid.loadXML("dhtmlxGrid/SubGridWebMailClient.xml");

here, in xml, in header section i am provided type=ch so that all the cell contains the check box button.

------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<head>
<column width="200" type="ro" align="left" color="#D4D0C8">
        Sub Stage View: Web Mail Client
</column>
        
<column id="user" width="80" type="ch" align="center" sort="na">
        User
        </column>
<column id="group" width="100" type="ch" align="center" sort="na">
        Group
        </column>
<column id="domain" width="100" type="ch" align="center" sort="na">
        Domain
        </column>
<column id="server" width="100" type="ch" align="left" sort="na">
        Server
        </column>
<column id="site" width="100" type="ch" align="left" sort="na">
        Site
        </column>

        
</head>
    <row id="mailclientlogin"><cell>Mail Client Login</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>
        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
    <row id="search"><cell>Search</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>
        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
    <row id="searchresults"><cell>Search Results</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>
        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
    <row id="viewmail"><cell>View Mail</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>
        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
    <row id="actonmail"><cell>Act on Mail</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>
        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
    <row id="addressbook"><cell>Address book</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>
        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
    <row id="compose"><cell>Compose</cell><cell style="background-color:#A0A0FF" ></cell><cell style="background-color:#A0A0FF"></cell>        <cell style="background-color:#A0A0FF"></cell>
        <cell></cell><cell></cell></row>
</rows>
------------------------------------------------------------------------------------------------------------------------------------------

here, what i am facing problem is, out of five column, i want to operate only on one column, means if a column is selected, then only the check box of that column should be active and remaining checkbox of other column must be deactivate. For this i want to put the horizontal radio button at first row.

Like in ur example http://www.dhtmlx.com/docs/products/docsExplorer/index.shtml, at 5th column ie 'In Store' if i select the radio button then only all the check box at that column must be activated(5th In Store).

Please, help to achieve the mentioned functionality as soon as possible.
Thank you.
Sandip
Answer posted by dhxSupport on Jan 20, 2009 08:52
Method setRowExcellType(rowId, type) has paremeters
rowId - row ID
type - type of excell

In you case you shoul use

newGrid.init(); 
newGrid.loadXML("dhtmlxGrid/SubGridWebMailClient.xml",function(){
       newGrid.setRowExcellType("mailclientlogin","ra_str");
       newGrid.setRowTextStyle("mailclientlogin","text-align:center");
});



Please note that this method availible only at pro version.
To use "ra_str" type you should include dhtmlxgrid_excell_ra_str.js file.

To disable/enable columns after radiobutton clicking you can use setDisabled(true) method;