check checkbox in listview to select the row
<p>I have a listview that displays results from a search. I want to be able to check a checkbox between each of the results and select the row in the listview.</p>

<pre><code>&lt;GridViewColumn&gt;
       &lt;GridViewColumn.CellTemplate&gt;
              &lt;DataTemplate&gt;
                   &lt;CheckBox x:Name="checkbox"/&gt;
              &lt;/DataTemplate&gt;
       &lt;/GridViewColumn.CellTemplate&gt;
&lt;/GridViewColumn&gt;
</code></pre>

<p>So far I have it working where you can select each row that you want and it will display the selections in a msgBox. Does anyone know how I could select the row when the corresponding checkbox at the end of each row is selected. </p>

<pre><code>Private Sub cmdAssociatedUsers_Click(sender As Object, e As RoutedEventArgs) Handles cmdAssociatedUsers.Click

Dim allGroups As String = ""

    For Each selectedItem As Object In listPerm.SelectedItems
        allGroups &amp;= listPerm.SelectedItems(0).xACE
    Next

    MsgBox(allGroups)
End Sub
</code></pre>