I have some Dojo cells in a grid within different columns that if empty I want to perform a certain action. I would like this action on only when the user right clicks so I have it in the onRowContextMenu(). I am currently getting the index of that row but do not know how to utilize and if I even need to utilize that row index for a conditional statement.
So per row I need to check four different columns to check if that has a value in it or not. Any ideas dojo gods?
Not sure if what you have is a DataGrid (that’s what I use)… maybe it’ll work for you too.
Use grid’s getItem(rowIndex) method.
where grid is a dojox.grid.DataGrid, rowItem should return an object that contains the values of each column.
You can then cycle through the object’s fields using for-in: