0

I created a DOJO 1.6 DataGrid with CheckboxSelector as shown in the tutorials. Now I want to disable the onSelectionChanged event for rows, if they are clicked. This event should only be fired, if the checkbox is clicked.

How can that be achieved? Is there a constructor property i missed?

intA
  • 497
  • 2
  • 10
  • 23

2 Answers2

0

You need to override the onRowClick method to not do the selection logic.

var grid = new dojox.grid.DataGrid({
    store: store,
    structure: layout,
    onRowClick: function(e){
       this.edit.rowClick(e);
       //this.selection.clickSelectEvent(e);
    }
  },
  node
);

http://jsfiddle.net/cswing/byfaf/

Craig Swing
  • 8,152
  • 2
  • 30
  • 43
0

"SelectionChanged"` even is available. so code like this:-

grid.on("SelectionChanged", function(event)
    { 
        var rowId = event.rowIndex;
        grid.selection.setSelected(rowId, true);
        grid.render();
     }

for example please see this

Hasnain Ali Bohra
  • 2,130
  • 2
  • 11
  • 25