重命名一些ListView项后刷新或更新ListView内容 [英] Refreshing or Updating ListView Contents After Renaming some ListView Items

查看:76
本文介绍了重命名一些ListView项后刷新或更新ListView内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆