OnRowselected check if row is checked and get value

I want to get the value of the checked column when row is selected

You may use the getValue() method to get the value of any grid cell.

myGrid.cellById(row_id, col_ind).getValue();

does this work with it is been called outside the grid function…?because its working when you call it the first time but the second time the value is coming as null

Unfortunately the problem cannot be reconstructed locally.
Could you please, provide a complete demo, where the problem can be reproduced.