开发者

Delete Multiple Records from ListView in ASP.NET using CheckBox in ListView

开发者 https://www.devze.com 2023-04-03 06:35 出处:网络
Using confirmation before delete from ListVi开发者_高级运维ew using C#. I have a ListView with CheckBox in it and I want to Delete the Items/Records from ListView which are selected with CheckBox in t

Using confirmation before delete from ListVi开发者_高级运维ew using C#. I have a ListView with CheckBox in it and I want to Delete the Items/Records from ListView which are selected with CheckBox in to it.

i.e Multiple select items and then Delete these Multiple Records from ListView

Any Idea?


would have left this as a comment but for some reason, I can't find where to add a comment...

The ListView control has a CheckedItems collection which you can iterate through, something like:

For Each lvi As ListViewItem In ListView1.CheckedItems
        lvi.Remove()           
Next


foreach(ListViewItem In ListView1.CheckedItems lvi) { lvi.Remove() }

0

精彩评论

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