evrencoskun / TableView

TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
MIT License
3.14k stars 459 forks source link

Apply Sorting On Load #288

Open sanakalam opened 4 years ago

sanakalam commented 4 years ago

Please let me know how to apply Columns sorting on Load. I am using below code but not getting my rquired output still i need to click on header then sorting applying

tableViewAdapter.setAllItems(tableViewModel.getColumnHeaderList(), null, tableViewModel.getCellList());
 mTableView.sortColumn(9, SortState.DESCENDING);
evrencoskun commented 4 years ago

Hi @sanakalam

Your problem is probably related to not setting row headers properly. Please try to set dummy row data set on your TableView and test your case again.

Unfortunately, you can not hide the row headers. Because it helps to the TableView in some calculations. In the future, we can make the TableView work without a column header. But because of its existing structure, it's not possible for now.