:: Forum >>

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
Friday, April 14, 2006
Starting with checkbox selection -

http://www.activewidgets.com/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)
Monday, April 17, 2006

This topic is archived.


Back to support forum

Forum search