I have read several posts on this in the forums, but I can't seem to grasp exactly how to code a many-to-many Heirarchical WebGrid. The bind is what is giving me problems. Lets say I have the following:
Distributors - Table of DistributorsDistributorsCriteria - Table of what Distributors may sellDistributorsCriteriaMap - Table mapping the two together
In my bind function, I have the Distributor first:
Dim cmdDistributors As New OleDbDataAdapter("select id, title, company_name, address1, address2, city, state_id, zip_code FROM Distributors", oleDbConnection1)
Dim cmdDistributorsCriteria As New OleDbDataAdapter("select id,criteria,description from DistributorCriteria where DistributorCriteria.id = DistributorCriteriaMap.criteria_id and DistributorCriteriaMap.distributor_id = ??????", oleDbConnection1)
Note the ?????? above, I can't figure out how to "relate" thse two tables together properly with the third (map) table.
Maybe there is a better way to do this, but I am using th Infragistics sample as my guide from: http://samples.infragistics.com/2007.3/webfeaturebrowser/contents.aspx?t=WebGrid/HierarchicalGrid/HierarchicalGrid.aspx%7Esrcview.aspx?path=../webfeaturebrowservb/WebGrid/HierarchicalGrid/HierarchicalGrid.src%7Esrcview.aspx?path=WebGrid/HierarchicalGrid/HierarchicalGrid.src