How add radio button in a grid

Hello everybody, I’m a newbie so…please be gentle with me :slight_smile:

I need to add a radio button with two different values in a row at the top of the grid. Can you help me please?

I have this code:



Grid g = new Grid();



    

        //create the Columns of the Grid

        Column c1 = new Column(“70”,“center”,“img”,“str”);

        c1.setSort(“na”);

        c1.setEditable(“false”);

        Column c3 = new Column("*",“left”,“combo”,“str”);

        c3.setBody(“Settore”);

        c3.setAutoAttribute(“true”);

        c3.setSourceAttribute(“BfuComboDataProvider”);

        c3.setCache(“true”);

        c3.setSub(“true”);

        c3.setEditable(“false”);

        Column c4 = new Column(“70”,“right”,“edtxt”,“str”);

        c4.setBody(“BUF”);

        

        Command cellEdit = new Command(“setOnEditCellHandler”,“doOnCellEdit”);

        AfterInit afterInit = new AfterInit();

        afterInit.addCommands(cellEdit);

        

        String ico2 = “Conferma”;

        String ico3 = “Aggiungi Settore”;

        c1.setBody("

" + ico2 + ico3 +"
");

        g.addHeadElements(c1,c3,c4);

        

        Settings settings = new Settings(“px”);

        

        g.addHeadElements(settings,afterInit);

The syntax which you are using differ from standard one, are you using some kind of wrapper around dhtmlxgrid?

In common case the type of each cell can be defined by column type, so for “ra” column - all data will be rendered as radio buttons.
If you need to have two radio buttons in the same cell - you need to create a custom excell with such functionality , or use native HTML inputs as

<![CDATA[
First Second
]]>