Thanks for the previous replies. I am working on Windows Form, and on Datagrid. I want something for editing so I have decided it with the help of context menu strip.
I want to know, how to get the selected column value
if the selected column is 1 then open form1
and if column2 is selected and contextmenu is clicked then open form2 how to get the column number and provide it in the if condition
I am working on this
label1.Text = dataGridView1.SelectedCells[0].Value.ToString();
but this code doesnt tranfers it gives the selected cell values.
how to determine which column is selected and put that in the if condition.
1 Answer