The code below is a stripped down sample that supports a DataGrid to which I have added a CheckBox Column.
When the Button is clicked I want scan the CheckBox Column to see which items have been selected. I have found some code on the web which must be a different VB version
(I am running Microsoft Visual Basic 2010 Express).
I have reduced the number of errors but can’t get the syntax to get the value from a checkbox and to read the associated control content.
Can anyone help please?
Option Explicit On
Option Strict On
Partial Public Class DataGrid_FilledFromCodeBehind
Private _ocEng As ObservableCollection(Of EnPlayer)
Public Property EngSqd() As ObservableCollection(Of EnPlayer)
Set(ByVal value As ObservableCollection(Of EnPlayer))
_ocEng = value
Private Sub Window_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
_ocEng = New ObservableCollection(Of EnPlayer)()
For i = 0 To 4
EngSqd.Add(New EnPlayer(ref(i), names(i), bat(i)))
Me.DataContext = Me
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim myDataGridItem As DataGridColumn
View Complete Post