Hi Fabio,
Thanks for your interest in Syncfusion products.
Your requirement to align the element can be achieved by setting the properties VerticalAlignment, HorizontalAlignment. Please refer the below code snippet.
[Codebehind – C#]
GridRelationDescriptor childrelationdescriptor = new GridRelationDescriptor();
childrelationdescriptor.ChildTableName = "Product";
childrelationdescriptor.RelationKind = RelationKind.RelatedMasterDetails;
childrelationdescriptor.RelationKeys.Add("Category ID", "Category ID");
childrelationdescriptor.ChildTableDescriptor.AllowNew = true;
GridGroupingControl1.TableDescriptor.Relations.Add(childrelationdescriptor);
this.GridGroupingControl1.Engine.SourceListSet.Add("Category", GetParent);
this.GridGroupingControl1.Engine.SourceListSet.Add("Product", GetDetail);
childrelationdescriptor.ChildTableDescriptor.Columns.FindByMappingName("Check").Appearance.AnyRecordFieldCell.VerticalAlignment = GridVerticalAlignment.Middle;
childrelationdescriptor.ChildTableDescriptor.Columns.FindByMappingName("Check").Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Center;
this.GridGroupingControl1.DataMember = "DefaultView";
this.GridGroupingControl1.DataSource = GetParent;
this.GridGroupingControl1.TableDescriptor.Name = "Category";
For your convenience, we have created sample and the same can be downloaded from the following link.
http://www.syncfusion.com/downloads/Support/DirectTrac/95502/2%20level%20hierarchy-1168793817.zip
Please let me know if you have any other questions or concerns.
Regards,
Sridhar.N