Client side javascript - get grid selected row values
Posted: Wed Nov 06, 2019 3:42 pm
I am trying to set some data elements on the screen based on what row was selected in a grid. So basically I want to get the grid column values for the selected row when onrowclick event is triggered. I then want to place these into some other fields to do updating. This is more of a test process just to know I am able to move or condition data from what has been selected in the grid and put it somewhere else.
Anyway, I have the following in the onrowclick event and it fails when I select the row with error "Cannot read property 'grid' of null".
var value = getObj("gridParts").grid.getCellValue(row, 0);
changeElementValue("getpart", value);
My grid is labeled gridParts and the output field on the screen is getpart.
Anyway, I have the following in the onrowclick event and it fails when I select the row with error "Cannot read property 'grid' of null".
var value = getObj("gridParts").grid.getCellValue(row, 0);
changeElementValue("getpart", value);
My grid is labeled gridParts and the output field on the screen is getpart.