Open farzadkamali20 opened 6 years ago
Hi @farzadkamali20,
If you try to find a cell item that whose id is "111", you can do this.
int row = findRowById("111");
if(row != -1){
tableView. setSelectedRow(row);
}
private int findRowById(String id){
List<List<Cell>> mCellItems = tableViewAdapter. getCellRecyclerViewAdapter(). getItems();
for (int i = 0; i < mCellItems.size(); i++) {
List<Cell> row = mCellItems.get(i);
for (int j = 0; j < insertRowData.length; j++) {
Cell item = row.get(j)
if(item.getId().equals(id)){
return i;
}
}
}
return -1;
}
hi friend. how I can search in tableview. i don't want filter, i want select row that I searched. for example I want find
111
in columnid
that it is unique, and set selected row. i dont know row number111
that use this code:tableView.setSelectedRow(row);
how to find that.