populate datagridview with combobox value

Ernesto
Ernesto used Ask the Experts™
on
Hi all
How can i populate a datagridview1 according to the value in a combobox?
im attach the form
thank you a lot
combobox has the distinct values of field "dibujo"
I need the datagrid display only the records that acomplish with the combobox value
thank you a lot
edo form
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:
In the selected index changed event of the combobox, use this code

dTable is the datatable that is datasource of the grid


dTable.DefaultView.RowFilter = "dibujo='" & combobox1.Text & "'"
DataGridView1.DataSource = dTable.DefaultView

Author

Commented:
your soo genius !!!
thank you a lot
i got a lot more
hope you been there
regards
Most Valuable Expert 2012
Top Expert 2014

Commented:
Glad to help :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial