Radio in Grid
I'm sure someone has asked and answer this a few times already but I just can't seem to find what I am looking for.
I need a grid with a radio in one column and each row is independant.
I tried a similar approach to the combo box but am just missing something basic I'm sure.
I know this code doesn't do anything other than create a grid and bungle up column 3 but hopefully this kind of shows where I'm going.
Changing row 1 should not change row 2. Row 1's radio is independant. Also, how would I query it a specific rows radio value? Or set it?
Thanks in advance.
I need a grid with a radio in one column and each row is independant.
I tried a similar approach to the combo box but am just missing something basic I'm sure.
var data = new AW.XML.Table;
data.setURL(data_url);
data.setRequestMethod("POST");
data.setParameter("type", "data");
data_response = data.response;
data.response = function(xml) {
data_response.call(this, xml);
grid.setRowCount(data.getCount());
grid.refresh();
}
var grid = new AW.UI.Grid;
grid.setId("grid");
grid.setHeaderText(["Column1", "Column2", "Column3", "Column4"]);
grid.setCellModel(data);
grid.setColumnCount(4);
grid.setVirtualMode(false);
grid.setSelectionMode("single-row");
grid.setSelectorWidth(25);
grid.setSelectorVisible(true);
grid.setSelectorResizable(true);
grid.setSelectorText(function(i){return this.getRowPosition(i)+1});
var radioValues = ['value1', 'value2', 'value3'];
grid.setCellEditable(true, 3)
grid.setCellTemplate(new AW.Templates.Radio, 3);
I know this code doesn't do anything other than create a grid and bungle up column 3 but hopefully this kind of shows where I'm going.
Changing row 1 should not change row 2. Row 1's radio is independant. Also, how would I query it a specific rows radio value? Or set it?
Thanks in advance.
Mike
June 17,