I have a tableview with 3 columns. Each column contains a header row containing text and multiple data rows containing UI widgets. Column 1 always contains a label while other columns normally also contain labels but may contain other widgets. I am only concerned about column 1 at the moment. Column contents are dynamically generated.
When the tableview is displayed initially, the column headers appear normal and the row order is the same as rows are added to the tableview programmatically. If I click on the column 1 header, the row order changes and a small up-pointing arrow is displayed. As I keep on clicking, the arrow goes from up facing to down facing then goes away and it keeps cycling if I keep clicking.
However, the row order never returns to the initial order, and the order is never alphanumeric.
On the one hand, it is annoying and there must be a way to stop the reordering, but on the other hand, I would like to know the rules defining the reordering because maybe I could use it. For instance, if there was a way to alternate between original order, alphanumeric or reverse alphanumeric it would be useful.
I realise that the rows containing labels may make it harder to sort on the text contents, and if so, simply turning off the feature would be better than what I have now.
Thanks in advance for any insight.
edit: poking around, I found this:
which seems to disable sorting, which seems the only practical solution when the table contains labels.
When the tableview is displayed initially, the column headers appear normal and the row order is the same as rows are added to the tableview programmatically. If I click on the column 1 header, the row order changes and a small up-pointing arrow is displayed. As I keep on clicking, the arrow goes from up facing to down facing then goes away and it keeps cycling if I keep clicking.
However, the row order never returns to the initial order, and the order is never alphanumeric.
On the one hand, it is annoying and there must be a way to stop the reordering, but on the other hand, I would like to know the rules defining the reordering because maybe I could use it. For instance, if there was a way to alternate between original order, alphanumeric or reverse alphanumeric it would be useful.
I realise that the rows containing labels may make it harder to sort on the text contents, and if so, simply turning off the feature would be better than what I have now.
Thanks in advance for any insight.
edit: poking around, I found this:
B4X:
tvMessage.SetColumnSortable( 0, False )
tvMessage.SetColumnSortable( 1, False )
tvMessage.SetColumnSortable( 2, False )
Last edited: