3 days ago (thanks to Olaf) I was able to make progress with binding a data collection to a DataGrid. Since then I have searched the web in vain for a VB example to
enable me to switch off the DataGrid AutoGenerateColumns and enter my own columns and appropriate Paths to the Collection’s properties.
The following code works fine but I can’t work out how to enter my own individual columns etc. Can anyone give me the syntax for an example of one column please?
Why is it so difficult to find VB examples of WPF demos etc? (Nearly everything is in C#.)
I have some experience in Access VB so have picked VB in trying to use WPF. I would be grateful for any links to VB WPF resources.
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), ages(i), bat(i)))
View Complete Post