开发者

How to make listview reorder itself when item is inserted

I have a list view in which I can insert items(the items are inserted in the database). The problem is that when I insert an item, it shows at th开发者_Python百科e bottom of the list. How can I make it go to the right position? The items should in alphabetical order. If I exit the app and enter, the inserted item is at the right position.


After changes to DB like inserting / updating / deleting you need to call requery() to your cursor, e.g. dbCursor.requery();


you can do array sort with alphabets and then assign to listview so it will display alphabets display.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜