I am using tableview module posted by EREL . My problem is when i use table1.clearall function the table's rows are not celared totally. is there any other function i must use for clearing all the rows ?
I know this is an old thread but I thought I would reply in any case maybe I can save someone an hour or 2. I had the same problem, if I call mytable.clearall it would not always clear all the data, if I only had one row, it cleared perfectly, but after that it did not work, always left some data in the table. It turns out the problem was that every time I add data to my database and display it in the table I did Table.Initialize and Table.AddToActivity so in effect I ended up with multiple tables on my screen all on top of each other and only the top table is cleared.
The solution was simple enough just had to check is the table IsInitialized with
B4X:
If CDTable.IsInitialized = False Then
CDTable.Initialize(Me,"CDTable",4)
CDTable.AddToActivity(Activity,lstCDItems.Left,lstCDItems.Top,lstCDItems.Width,lstCDItems.Height)
CDTable.SetHeader(Array As String("SaleLnNum","Description","Qty","Total"))
CDTable.SetColumnsWidths(Array As Int(0%x,50%x, 25%x, 25%x))
CDTable.RowHeight = 110
Else
CDTable.ClearAll
End If