I have a DataGrid, consisting of 2 columns, one type DataGridTextColumn, the other DataGridComboBoxColumn.
All columns are loaded with the same value, "Item 0" "item 1", "item 3".
This is the situation: in the first column I have the values in the second column, DataGridComboBoxColumn, I don't see ANYTHING.
If I click in any cell of the second column, I get the ComboBox populated with the correct values: ("A1", "A2", "A3")
Where is the error and why the second column is empty?
Below I post the code to which I refer.
Many thanks
'Load data
Dim dt As New DataTable()
Dim dr As DataRow
dt.Columns.Add(New DataColumn("PopolaTEST", GetType(String)))
Dim i As Integer
For i = 0 To 3
dr = dt.NewRow()
dr(0) = "Item " + i.ToString()
dt.Rows.Add(dr)
Next i
Dim dv As New DataView(dt)
Test.ItemsSource = dv
Code in the del Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:col="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Title="MainWindow" Height="350" Width="525">
Replies
Know the answer? Post it — somebody with the same question will find it here.