windows generated code
-
mercoledì 14 dicembre 2005 14:44When you drag a datatable onto the form and then drag another data table that is linked to the first table, you have created a master/detail database. I have it working properly but would like to know where the windows generated code is so I can learn how to program that. I have looked in the Form1.Designer.VB but it is not there. When I click on a row in the master table, it fills the detail table. It must do some type of parameter or query. Where is that code. Thank you.
Tutte le risposte
-
giovedì 15 dicembre 2005 00:45I'm assuming you have a dataset that has a foreign key constraint to link the tables together. The code would probably be there. If not there, check the BindingSource.
-
venerdì 16 dicembre 2005 18:52Moderatoreif you see a dataSet (.xsd) file in your Solution Explorer, you can check out the SataSet.Designer.vb file also
-
venerdì 16 dicembre 2005 18:59Moderatore
Hi,
I checked into Form1.Designer.vb for the code that you mentioned. When I ran through an example, assuming Customers is my master table and Orders is my detail table, Form1.Designer.vb contains the following lines of code:
Me.OrdersBindingSource.DataMember = "FK_Orders_Customers"
Me.OrdersBindingSource.DataSource = Me.CustomersBindingSource '...took out some other lines of code here...'Me.OrdersDataGridView.DataSource = Me.OrdersBindingSource
Hope that helps,
Yun

