admin管理员组文章数量:1402935
In Delphi 12.0, I'm using Firemonkey TListview
.
I link a dataset to it so the contents show the dataset correctly.
However if I modify a record it will not update the changed row in TListview
.
aDataset.Refresh
- does not work
LinkFillControlToField.Active := False / True
works but as dataset is big, it takes too long to refresh the entire Listview
Listview.Repaint
- does not work
Listview.Items[ItemIndex].Invalidate
- does not work as it merely marks it invalidate for future painting. I don't see any more methods for TListviewItem
for refresh purpose.
I know one way is to set each of the items in TListviewItem
to my dataset manually.
However, I'm using dynamic mode, so it is difficult to have to code each TListview
according to different item names (in the TListviewItem
) to set to the record data all over again. Think 20-30 TListview
and it already starts to feel like never-ending code.
Is there a more elegant solution that can force TListview
to re-draw just that one single TListviewItem
row that changed? (I know the ItemIndex as I can record it before I edit the row)
本文标签: listviewFiremonkey TListview linked to dataset refresh issueStack Overflow
版权声明:本文标题:listview - Firemonkey TListview linked to dataset refresh issue - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744356134a2602313.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论