Click here to Skip to main content
14,739,784 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Suppose there is a grid view with 4 column . First column has a drop downlist which is bind to a field of a table(employee) and other three columns have three text boxes .These text boxes are bind to three field of a different table(projects). Now I want to assign all the employee ID from the table employee to the drop down list and insert the corresponding data into the project table. I don't know how to do it . So , please help me.
Posted
Updated 12-Apr-11 9:12am
v2
Comments
Sandeep Mewara 12-Apr-11 9:07am
   
I don't know how to do it
So no effort at all?

1 solution

I dont know how exactly do you bind your data into your gridview so I will tell you what you have to do and you make this on your own code


you have to check the cell end edit event for the dataGridView and check for the value of the first column of yours and fill the other columns the way you bind your data with it


private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
              {
                  if(dataGridView1.CurrentRow.Cells[0].value=="whatever you check")
                    {
                        //bind the data for the other columns 
                    }
              }
   

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