:: Forum >>

Determine if checkeditem template in selector column is checked

Ok, how is this not obvious. I'm spending 30 minutes trying to find out how to determine if a CheckedItem template is/is not checked.

I have the following (because I want checkboxes in the selector column):

myGrid.setSelectorTemplate(new AW.Templates.CheckedItem);

I get the CheckedItem template from row 0:

myGrid.getSelectorTemplate(0);

And now that I have that how do I know if it is checked?

Note that myGrid.getSelectedRows() is insufficient because they can have a cell selected elsewhere, and it will show up as a selected row from that call. This could lead to deleting data they don't intend to -- I need to check and make certain that the checkbox for the row selector is checked for all of the selected rows.
John
Thursday, February 4, 2010
obj.setSelectionMode("none"); //selects a row only when the selector is clicked

obj.onSelectorClicked = function(value, i){
this.getSelectorTemplate(i).refresh();
alert(obj.getSelectorTemplate(i).getStateProperty("selected") );
}
Thursday, February 4, 2010

This topic is archived.


Back to support forum

Forum search