Click here to Skip to main content
15,351,641 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am using Parent Datagridview,Child Gridview,SubChild Gridview in my form.
This datas are getting records from Different Tables.
If the records inthe table, It must view the datas. But if the table has no values
may typing the datagridview. But my problem is whenever the user typing the datas the dropdownlist will appear, they can selecting it which is retrieve by database table. Is it Possible? Please help me..

And then I have set Identity Column in ID field of the Child Table, Can we set AutoIncreament on the datagridview at runtime?

My code for binding datasource is

masterda = New SqlDataAdapter("Select * from tbl_ProductMaster where ProductType='OTHER ITEMS'", Cn)

           data.Locale = System.Globalization.CultureInfo.InvariantCulture
           masterda.Fill(data, "Customers")

           detailsda = New SqlDataAdapter("Select MENUID,MENUNAME,MENUQTY,UOM,ID from MenuContains", Cn)
           detailsda.Fill(data, "Orders")

           detailsda1 = New SqlDataAdapter("Select * from ReceipeContains", Cn)
           detailsda1.Fill(data, "Receipes")

           Dim relation As New DataRelation("CustomerOrder", data.Tables("Customers").Columns("ID"), data.Tables("Orders").Columns("MenuID"))

           Dim relation1 As New DataRelation("OrderReceipes", data.Tables("Orders").Columns("ID"), data.Tables("Receipes").Columns("Raw_ID"))

           masterbindingsource.DataSource = data
           masterbindingsource.DataMember = "Customers"

           detailsbindingsource.DataSource = masterbindingsource
           detailsbindingsource.DataMember = "CustomerOrder"

           detailsbindingsource1.DataSource = detailsbindingsource
           detailsbindingsource1.DataMember = "OrderReceipes"
Updated 5-Sep-12 23:51pm

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