Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1460
rowIndex is not zero-based but the methods expecting the index of the row are...
posted

Is this normal or something that's happening to me locally?  When I retrieve the rowIndex it starts with 1 but when I have to pass the rowIndex to another method it expects 0 for the first row.  The index for cells is zero-based.

 

 

{ name: "Selection",                            
   mode: "cell",                            
multipleSelection: false,                            
activation: true,                            
cellSelectionChanged: function (evt, ui) {                                
if (ui.cell.columnKey === 'NextRound') {                                    
var actualRowIdx = ui.cell.row[0].rowIndex - 1 // rowIndex is not zero based, but other methods are and expect a zero-based index (since Infragistics no longer tests their products)                                    
var myCell = grid.igGridSelection('getCellValue', actualRowIdx, 'NextRound');                                    
var dataview = grid.data('igGrid').dataSource.dataView();                                    
var myVal = dataview[actualRowIdx]["NextRound"];                                   
grid.igGridSelection('selectCell', actualRowIdx, ui.colIndex);                                    
grid.igGridUpdating('startEdit', actualRowIdx, ui.colIndex);                                   
grid.igGridUpdating("setCellValue",actualRowIdx, 'NextRound', !(myVal));                                    
dataview[actualRowIdx]["NextRound"] = !(myVal);                                
}

}