hye,

i have a question about listview checkbox, recently i have tried to do a checkbox inside listview and its print well. but the result are not as i want, what i want is the checkbox is save the item to text file base on which checkbox is checked first. As an example

ooo.PNG

the picture show that there are order for which one i checked first, the result should be
IF1_b - > IF1_a - > IF

but what i get is
IF1_b - > IF - > IF1_a

hope i can get some help with this

Take a look at the Listview.ItemChecked event. In that event handler, Add the item to a List<ListViewItem> defined at the level of the form. If the ListViewItem gets unchecked, Remove it from the list. When it is time to output, go through the list and output the Text in order.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.