We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,682 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Unable Get CheckBox Datagrid Column value weird

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

2
Contributors
4
Replies
3 Days
Discussion Span
6 Months Ago
Last Updated
5
Views
Question
Answered
tedy.jd
Newbie Poster
4 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Show us your code...

G_Waddell
Practically a Master Poster
618 posts since Nov 2009
Reputation Points: 107
Solved Threads: 92
Skill Endorsements: 5
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....

tedy.jd
Newbie Poster
4 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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
tedy.jd
Newbie Poster
4 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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

tedy.jd
Newbie Poster
4 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 6 Months Ago by G_Waddell

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0893 seconds using 2.66MB