There is a list of student names in the listview. As detailtext, I want to put the 2nd indexed scores of the students in the list in their tags in TinyDB. Is this possible?
Can you give an example of that?
I store students' names in tags in TinyDB. There are lists on the tags of students' names. The student's class in the first index, the student's score in the second index. In the listview, I want the student's name to appear as main text and the student score in the second index to appear as detailtext.
This storage technique lets you store as much data as you like under each student's name in a TinyDB.
Once you have data stored in TinyDB, you can loop through all the tags in TinyDB and build up a list of ListView Elements from the tags and values.
I have been using TinyDB effectively for years. My problem is with detailtext in listview. I want to see the value at the 2nd index of each item in my main list in the listview as the detailtext of that item.
Use the CreateElement block. To the detail Text input of this block, append the blocks that fetch the detail from tinyDB, which you showed above.
What should I write in the main text part of the CreateElement block? Should I also create a new list like this and send it to listview?
You can pass there the name of the tinydb tag from which it retrieves data. Or as @TIMAI2 showed.
Thank you so much. İt's solved my problem.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.