Click here to Skip to main content
16,013,338 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Guys,
i would like to ask about how to get data in gridview form selecting of the combobox
how if i choose text from combobox this selection get the table data in gridview i know it easy but i'm new in asp.net
thanks.
Posted
Comments
ChrisCreateBoss 10-Oct-15 19:52pm    
Tell me if I did understand well; You want to enter some text into a combobox and check if the entered string exists in the datagridview?
Member 12048906 11-Oct-15 8:12am    
thank you for your reply, but what i want is if i have two items in combobox, if i select the first one the grid view get the table data. i hope that i explain it.

1 solution

hey, try this
private void comboBox1_SelectedIndexChanged([...])
{
     this.dataGridView1.columns[0].Rows[0].Add(this.comboBox1.Text);
}


I hope, I could help you.
 
Share this answer
 

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