if (dataGridView1.CurrentRow.Cells[0].Value.ToString() == "a") { (dataGridView1.CurrentRow.Cells[1] as DataGridViewComboBoxCell).Items.Add("a1"); // populate combobox with items //dataGridView1.CurrentRow.Cells[2].Value.ToString() == "Hallo"; // Here I try to set the text in cell 3 to Hallo }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.CurrentCell.Value !=null) if (dataGridView1.CurrentCell.Value.ToString()=="a") { (dataGridView1.CurrentRow.Cells[1] as DataGridViewComboBoxCell).Items.Clear(); (dataGridView1.CurrentRow.Cells[1] as DataGridViewComboBoxCell).Items.Add("a1"); dataGridView1.Rows[0].Cells[2].Value = "Hallo"; }
dataGridView1.CurrentRow.Cells[2].Value.ToString() == "Hallo"; // Here I try to set the text in cell 3 to Hallo
datagridview1.CurrentRow.Cells[2].Value = "Hello";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)