Question how can i call a 3 datagridview in one search button(all i can do is one datagridvie)

Joined
Aug 8, 2011
Messages
20
Location
Batangas City, Philippines
Programming Experience
Beginner
how can i call a 3 datagridview in one search button

i have a textbox and button for the searching method.... it is ok.. i use the student number for searching
and it works..


but i need to do is..

call or view all datagridviews with the student number (all 4 tables have the same record of student number)

this is my problem.. i have 4 tables,, 1styear,2nd year 3rd year, 4th year..

what i need to do is.. display all that tables in one form by using the search button

any tips? hints? reply would be so appreciated thanks
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,374
Location
Sydney, Australia
Programming Experience
10+
This has got nothing to do with DataGridViews or Buttons. It has only to do with DataAdapters and DataTables. If you have four tables to get data from then you need to call Fill on a DataAdapter four times. It might be the same adapter with the SQL changed or different ones each time. Regardless, you simply pass the same DataTable each time. Existing data will not be removed so you end up with one DataTable containing the results of four queries.
 
Top Bottom