Manish Kumar

Manish Kumar

  • NA
  • 50
  • 959

How to save Datagrid in wpf

Oct 27 2014 3:10 AM
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);