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
close icon

Master Detail relation in the collection

Hi

I have 2 collection sets...I need to define master detail relationship between 2 collection and show in the grid grouping control....
2 collections are _analysisReportData & _way
I have tried below code but it is not working ....system gets hang...

GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor();
parentToChildRelationDescriptor.ChildTableName = "Colour";
parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;
parentToChildRelationDescriptor.RelationKeys.Add("Department","Department");
this.dgAttributeAnalysis.Engine.SourceListSet.Add("MyParentTable", _analysisReportData);
this.dgAttributeAnalysis.Engine.SourceListSet.Add("Colour", _Way);
this.dgAttributeAnalysis.TableDescriptor.Relations.Add(parentToChildRelationDescriptor);


Please tell me whats wrong inthis code and what is right way to do this

Thanks
Harshad

1 Reply

AD Administrator Syncfusion Team February 5, 2007 09:57 PM UTC

Hi Harshad ,

I am not sure of what be might be causing this strange behavior without a working sample. I have tested this issue in the attached sample with Essentail studio V.4.x. I was not able to reproduce the issue. Maybe I am not following the steps that you are doing. Please post us a sample showing this problem or modify the attached samples to reproduce the problem, which will help me to find the issue and resolve this.

RelatedMasterDetails.zip

Thanks for your patience.

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon