I was doing xaml with vb coding in vb 2010

I create a datagrid and linked itemssource with table adapter, and also I modify a columns to checkbox datagrid columns.

Problem now is I checked the checkbox value in the columns in datagrid but through button check the data grid cell also is null.

Is there wrong?

Purpose to assign a checkbox datagrid columns is loop and insert the data which is checked

Show us your code...

Friend WithEvents dgvCombo As New DataGridComboBoxColumn
Friend WithEvents newcombobox As New ComboBox

Private Sub datagrid1_AutoGeneratingColumn(sender As System.Object, e As System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs) Handles datagrid1.AutoGeneratingColumn

If e.PropertyName = "WantSummore" Then

        newcombobox.Items.Add("Absent with letter")
        newcombobox.Items.Add("Absent with no letter")
        newcombobox.Items.Add("Late")
        dgvCombo.ItemsSource = newcombobox.items


   e.Column = New DataGridComboBoxColumn()
   e.Column = dgvCombo
End If

Is there format the column wrong? Is visible when i click the cell inside, but after selected the combo items. it missing in cell again....

sorry i found that i comment wrong. It is

If e.PropertyName = "Letter" Then
   Dim dgvCheckBox As New DataGridCheckBoxColumn
   e.Column.DisplayIndex = 3
   e.Column = dgvCheckBox
   e.Column.Header = "Absent"
End If

I solve it by myself. using getcellcontent + loop can read which row have benn checked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.