0

Using confirmation before delete from ListView 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?

2 Answers 2

0

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
Sign up to request clarification or add additional context in comments.

1 Comment

Sorry! But i Need in C#.And i have Binded the ListView using SQLDatasource with CheckBox in to it...!
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.