在listvew中选择一个要删除的项目,该项目应删除,然后自动选择下一个项目. [英] select one item to remove in listvew ,item should remove and next item selected automatically.
本文介绍了在listvew中选择一个要删除的项目,该项目应删除,然后自动选择下一个项目.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我在项目中使用listview,并且想为其删除项目,但是问题是,当我删除选定的项目时,它可以删除.但是如果我再次选择删除它,请选择要删除的项目.
所以我想,如果我在listvew中选择一个要删除的项目,则该项目应删除,然后自动选择下一个项目.
请以示例的方式帮助我.
在此先感谢
hello, i use listview in my project and i want to remove item for it, but problem is that when i remove selected item it remove fine. but if i cleck again for remove it show please select item to remove.
so i want, if i select one item to remove in listvew ,item should remove and next item selected automatically.
please help me how , with example.
thanks in advance
推荐答案
好吧,不要依赖自动选择.计算您需要选择或取消选择并使用System.Windows.Forms.ListViewItem.Selected
的项目.
免责声明.我假设System.Windows.Forms
因为OP没有指定用于UI库的内容.
—SA
Well, do not rely on automatic selection. Calculate the items you need to select or deselect and useSystem.Windows.Forms.ListViewItem.Selected
.
Disclaimer. I assumedSystem.Windows.Forms
as OP did not specify what is used for UI library.
—SA
这篇关于在listvew中选择一个要删除的项目,该项目应删除,然后自动选择下一个项目.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文