:: Forum >> Version 2 >>

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(valuei){
    
this.getSelectorTemplate(i).refresh();
    var 
index this.getCellText(1,i);
    var 
related_rows = new Array();
    var 
1;
    for(
i=1i<=this.getRowCount(); i++) {
      if( 
this.getCellText(1,i) == index) {
        
related_rows.push(i);
      }
    }    
    
this.setSelectedRows(related_rows);
    for (
1<= this.getRowCount(); i++) {
      
this.getSelectorTemplate(i).refresh();
  }
  
this.refresh();
}

 
Sushanth
Wednesday, March 10, 2010



This topic is archived.

Back to support forum

Forum search