0
Answer

How to save Datagrid in wpf

Manish Kumar

Manish Kumar

10y
597
1
I have a datagrid in my wpf application. I have added one combobox on that datagrid. Now I want to insert the values of datagrid in SQL Table, but I a not able to do that because the values of the combobox is taking null value. I have written following code to bind combobox in data grid.
DataGridComboBoxColumn c1 = new DataGridComboBoxColumn();
c1.Header = "ProposalStatus";
var arr3 = new string[] { "ACCEPT", "REJECT", "HOLD" };
c1.ItemsSource = arr3;
DataGrid1.Columns.Add(c1);