3.2.0

Calling setSelectedRows from within onRowSelectedChanged

I have a requirement to automatically select other rows based on the current row selected by a user. So I tried callling setSelectedRows from within onRowSelectedChanged. The rows seem to be selected (when I do a getSelectedRows I get back the rows that were auto-selected too) but the checkboxes for the other rows are not refreshed to show that they are selected too.

Appreciate any pointers on how to fix this. Thanks!

Here's my code:

obj.onRowSelectedChanged = function(value, i){
    this.getSelectorTemplate(i).refresh();
    var index = this.getCellText(1,i);
    var related_rows = new Array();
    var i = 1;
    for(i=1; i<=this.getRowCount(); i++) {
      if( this.getCellText(1,i) == index) {
        related_rows.push(i);
      }
    }    
    this.setSelectedRows(related_rows);
    for (i = 1; i <= this.getRowCount(); i++) {
      this.getSelectorTemplate(i).refresh();
  }
  this.refresh();
}
Sushanth
March 10,

This topic is archived.

See also:


Back to support forum