Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m having datagrid in wpf having a checkbox column template
want to access checkbox state check /uncheck here is my code
VB
Dim dr As DataRowView
           Dim i As Integer = 0
           Dim chk As New CheckBox
           While i < grd.Items.Count
               dr = grd.Items(i)

               grd.Items(0)(0).isChecked = True



               'chk = CType(dr(0), CheckBox)
               'MsgBox(chk.Content)

               If chk.IsChecked Then
                   MsgBox(dr("amount"))
               End If
               i += 1
           End While
Posted

1 solution

It is very easy modify your datagrid
<checkbox checked="MyChk_Checked" name="chk1">
Unchecked="MyChk_Unchecked"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsChecked="{Binding Sel, UpdateSourceTrigger=PropertyChanged}">


 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900