Click here to Skip to main content
15,997,408 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm adding a dropdown in a form and filling it with the columns. After selecting the column, it should display in datagridview.
I'm getting the header name in the datagridview but not the values. Can anyone please help me?

What I have tried:

I'm struck with the below code:

dataGridView1.Rows[RowCount - 1].Cells[cmbIdentifier.Text].Value =

Where cmbIdentifier is my dropdown name. If i give, dataGridView1.Rows[RowCount - 1].Cells[cmbIdentifier.Text].Value = Column[i]; i'm getting the values of other column.
Posted
Comments
Sinisa Hajnal 10-Feb-16 4:24am    
Set a breakpoint at that line and check each value you get. Also, describe how and where you're calling the above code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900