I’m attempting to check a box in a grid using the CheckBoxSelectionModel.
As the grid loads data from my store, how do I get the rowIndex of the row being loaded? I would like to test the value of a particular column dataIndex, and based on the value I would like to select the box at the beginning of the row.
This code does not work, but this is what I’d like to do:
columns:
[
{dataIndex: 'de_sealed_doc', renderer: function(value,rowIndex,store,record){
console.log('rowIndex == '+rowIndex);
var sealedDocIndex = this.rowIndex;
//var gridModel = grid.getSelectionModel().select(2);
grid.getSelectionModel().select(sealedDocIndex);
//grid.getSelectionModel().selectAll();
console.log('sealedDocIndex --> '+sealedDocIndex);
//console.log('gridModel--> '+gridModel);
console.log('value--> '+value);
},
hidden: true},
{header: 'Document #', dataIndex: 'de_seqno', width: 100},
{header: 'Docket Text', dataIndex: 'docketText', renderer: this.customRenderer, width: 1000},
{header: 'Document(s)', dataIndex: 'docsDisplay', width: 500}
],
Could someone please assist me with this? If you need to see more of the code, so that it makes more sense, just let me know.