We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

AddRelation fails

What are the reasons AddRelation would not return a GridHierarchyLevel? I am binding to a Ds which I have constructed "by hand" and used a constant for the relation name. When I use the same constant in the call the AddRelation I get back null. I browsed the Ds after its bound to the grid to verify that the DataRelation is indeed in the collection and is named correctly. So are there other reasons this call might return null? Tx, curt

3 Replies

AD Administrator Syncfusion Team February 11, 2003 03:16 PM UTC

Did you set the relation name correctly? Example: ds.Relations.Add(ds.Tables[1].Columns["ProductID"], ds.Tables[2].Columns["ProductID"]); ds.Relations[1].RelationName = "Products_OrderDetails"; GridHierarchyLevel hlProducts_OrderDetails = gridBinder.AddRelation("Products_OrderDetails"); Other than this I can't tell without looking at some code why it returns null. I would need a sample project than. It is best if you create a support incident then. Stefan


AN Andrew May 17, 2003 02:11 PM UTC

Hi, I just found that binder.AddRelation() didn't initialize GridHierarchyLevel if there're no data in related tables. Is there a workaround to fix that? thx, Andrew


AD Administrator Syncfusion Team May 17, 2003 07:22 PM UTC

Sorry, we have no workaround for that. But this problem will be fixed in the 1.6 release which should be really out very soon. Stefan

Loader.
Up arrow icon