Click here to Skip to main content
14,488,436 members
Rate this:
Please Sign up or sign in to vote.
See more:

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.
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100