if($('#dg').treegrid('getLevel', row_id) > 0) { // row exists } else { // row does not exist or... // "Sorry developer, but the row is in another page!" }