I have a DataGrid
and I want based of the data to determine the type of columns and create for these DataGrid.
That mean that I see that the field is a date then i want to have a date picker in the DataGrid.
Case "CURDATE"
Dim col As New DataGrid Template Column
col.Header = "Yay"
Dim fac As New FrameworkElement Factory
Dim b As Binding = New Binding ("CURDATE")
fac.SetValue (DatePicker.SelectedDateProperty b)
Dim cellil As DataTemplate = New Data Template
cellil.VisualTree = fac
col.CellEditingTemplate = cellil
Ctr.Columns.Add (col)