开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜