DataGrid x:name="dataGrid"
DataGridTextColumn so = new DataGridTextColumn(); so.Header = "S.No"; dataGrid.Columns.Add(so); DataGridTextColumn name= new DataGridTextColumn(); name.Header = " Name"; dataGrid.Columns.Add(name); DataGridColumn age= new DataGridTextColumn(); age.Header = "Age"; dataGrid.Columns.Add(age); for (int i = 1; i <= p; i++) { DataGridComboBoxColumn ss = new DataGridComboBoxColumn(); ss.Header = i; List<string> list = new List<string>(); list.Add("Item 1"); list.Add("Item 2"); ss.ItemsSource = list; ss.Width = 50; ss.EditingElementStyle = style; dataGrid.Columns.Add(ss); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)