How to insert checkboxes to all item in listview

Posted by Sudhakar_A under WPF on 12/27/2013 | Points: 10 | Views : 3256 | Status : [Member] | Replies : 3
I have an listview whose column name and data are extracted from a XML file.
I want to add two checkboxes right to all row i.e when i select any item or row from the list, it gives some input for ma C# code and i need to checkbox to read and write values to ma device connected through com port.

Pls help me to sort.

How to insert two checkboxes to column name-Read and Write.




Responses

Posted by: Sudhakar_A on: 12/27/2013 [Member] Starter | Points: 25

Up
0
Down
I have an listview whose column name and data are extracted from a XML file.
I want to add two checkboxes right to all row i.e when i select any item or row from the list, it gives some input for ma C# code and i need to checkbox to read and write values to ma device connected through com port.

Pls help me to sort.

How to insert two checkboxes to column name-Read and Write for all the row of listview

Sudhakar_A, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vishalneeraj-24503 on: 12/27/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Please refer:-
http://www.codeproject.com/Articles/157033/How-to-Add-a-Checkbox-to-a-List-View-Column-Header
http://www.dotnetperls.com/listview
http://www.codeproject.com/Questions/289178/how-to-add-the-Checkboxes-in-the-SEcond-column-of
http://www.daniweb.com/software-development/csharp/threads/348345/listview-checkbox


Sudhakar_A, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ring on: 12/29/2013 [Member] Starter | Points: 25

Up
0
Down
Hello Sudhakar,
try to use a togglebutton, like
<ToggleButton  Name="Toggler">

</ToggleButton>
<StackPanel Visibility="{Binding ElementName=Toggler, Path=Checked, Converter={StaticResource booleanToVisibilityConverter}}">
<!-- in here you can place the checkboxes-->
</StackPanel>

you need create a valueconverter which converts from boolean to the enumeration Visibility.
Hope it helps

Sudhakar_A, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response