I am beginner In C#. I am working on Datagridview, Data of Gridview is coming from SQL table and i have made a ComboboxColumn and added some values in it. I want if i select any value from Dropdown of ComboboxColumn it should be shown on only one specified column without reflecting other columns... I am trying below code. This code is working but when i change values of other columns the one specified column value is also changing which i want should only be done with ComboboxColumn.
private void ViewDataGrid_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
ViewDataGrid.Rows[e.RowIndex].Cells["Arrival_State"].Value =
ViewDataGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}