3.0 beta 2

Radio button in grid

I need to put a radio button in the grid and have only one value capable of being selected (i.e. if radio button is selected on row1 and then the radio button is selected on row2, then, the radio button is deselected on row1). Any ideas?
AWSWUser
April 14,
Starting with checkbox selection -

/grid.howto.selections/selecting-rows-with-checkboxes.html

var myController = {

        onKeyUp:		"selectPreviousRow",
        onKeyDown:		"selectNextRow",
        onKeyHome:		"selectFirstRow",
        onKeyEnd:		"selectLastRow",
        onKeyCtrlHome:	"selectFirstRow",
        onKeyCtrlEnd:	"selectLastRow",
        onKeyPageUp:	"selectPageUpRow",
        onKeyPageDown:	"selectPageDownRow",
        onRowMouseDown:	"selectClickedRow",

        onRowSelectedChanged: function(v, i){this.getRowTemplate(i).refresh()}
};



    var obj = new AW.UI.Grid;

    obj.setCellData(function(c, r){return c + "." + r});
    obj.setHeaderText("header");
    obj.setColumnCount(10);
    obj.setRowCount(100);

    obj.setController("selection", myController);
    obj.setCurrentSelection("row");
    obj.setCellTemplate(new AW.Templates.Radio, 0);

    document.write(obj);
Alex (ActiveWidgets)
April 17,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.