Table sorting issue

Hi all,I only recently started using juce and I’ve managed to make a table (using the juce demo) and fill it with values from an sqlite3 database.However,each time I scroll or click on any cell the table values randomly get sorted.Is there a way to override this behaviour as I have tried going through the juce demo and I can’t point it out.I’m sorry I can’t post any code sample since I’m using my phone, any pointers would be highly appreciated.thank you.

Really hard to know what you might be doing wrong from that description, but perhaps you’re not taking into account the re-use of table row components? If you’re using refreshComponentForCell(), make sure you read its instructions very carefully.

Thanks for the reply.I’ve finally managed to get it working by first loading all data from the sqlite table into a vector and then traversing the vector in the paintcell method.I was initially loading each column directly from the database into the paintcell() method.As I’m new to juce I don’t know why/how it works