I am trying to create a WPF application. In my application I want to add a ComboboxCell in 3 row of my dataGrid.
I can do this in C# window application by using the following code:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
for (int i = 1; i < 13; i++)
{
dataGridView1.Columns.Add("Slot" + i, "Slot " + i);
}
for (int i = 0; i < 18; i++)
{
dataGridView1.Rows.Add();
}GridBaseCells();
}
DataGridViewComboBoxCell ModeCell = new DataGridViewComboBoxCell();
string[] Modes= { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" };
void GridBaseCells()
{
ModeCell.Items.AddRange(ModeAr);
for (int i = 2; i < 14; i++)
{
dataGridView1[i, 3] = (DataGridViewComboBoxCell)ModeCell.Clone();
dataGridView1[i, 3].Value = "C";
}
}
}
I am trying to implement the same using WPF. But i am not able to do this(I cant find DataGridViewComboBoxCell).
How can I do this?
(Please help with an example. I am new to WPF, don't have much Idea in binding and all).