重命名一些ListView项后刷新或更新ListView内容 [英] Refreshing or Updating ListView Contents After Renaming some ListView Items
问题描述
在VB 2005中,我使用ListView来显示文件名。
In VB 2005, I'm using a ListView to display filenames.
重命名文件后,我尝试失败:
After renaming a file, I try unsuccessfully:
ListView.Refresh(),ListView.Update(),ListView.Begin / EndUpdate(),甚至.RedrawItems(,)。
ListView.Refresh(), ListView.Update(), ListView.Begin/EndUpdate(), and even .RedrawItems(,).
源是一个节点(用作目录)从TreeView,有没有人建议我作为解决方案?
The source being a node (used as directory) from a TreeView, does any One have a suggestion to me as a solution?
提前谢谢。
Serge
推荐答案
您好,
您可能需要重新绑定ListView。刷新列表只会重绘现有项目,而您需要根据新信息创建新项目。
You will probably need to re-bind your ListView. Refreshing the list will only redraw the existing items, while you need to create new items based on the new information.
您能否向我们展示一些有关创建/绑定项目的代码?
Can you show us some code about creating/binding the items?
希望这有助于
这篇关于重命名一些ListView项后刷新或更新ListView内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!