object val = this.gridDataBoundGrid1[e.RowIndex,27].CellValue;
To decide what level a particular row is, you use the GridBoundRecordState object.
GridBoundRecordState state = grid.Binder.GetRecordStateAtRowIndex(e.RowIndex);
//state.Level holds the hierarchy level for the row.