Hello,
I have a GridGrouping Control.
my grid is created in the markup code.
but the child grid is created dynamically.
how can i make one of the columns to be a linkButton column?
and which event is there when i click one link (one cell)?
thanks in advance
waiting for an answer, jone
Hi Jone,
Thanks for your interest in Syncfusion products.
Please refer the following code which explains parent child relation with two table. Make use of this code in your application accordingly.
<code>
DataTable
parentTable = GetParentTable(); DataTable childTable = GetChildTable(); DataTable grandChildTable = GetGrandChildTable(); // Manually specify relations in grouping engine. The DataSet does not need to have any DataRelations. GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor();parentToChildRelationDescriptor.ChildTableName =
"MyChildTable"; parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;parentToChildRelationDescriptor.RelationKeys.Add(
"parentID", "ParentID"); // Add relation to ParentTablegridGroupingControl1.TableDescriptor.Relations.Add(parentToChildRelationDescriptor);
GridRelationDescriptor childToGrandChildRelationDescriptor = new GridRelationDescriptor();childToGrandChildRelationDescriptor.ChildTableName =
"MyGrandChildTable"; childToGrandChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;childToGrandChildRelationDescriptor.RelationKeys.Add(
"childID", "ChildID"); // Add relation to ChildTableparentToChildRelationDescriptor.ChildTableDescriptor.Relations.Add(childToGrandChildRelationDescriptor);
// Register any DataTable/IList with SourceListSet, so that RelationDescriptor can resolve the name this.gridGroupingControl1.Engine.SourceListSet.Add("MyParentTable", parentTable); this.gridGroupingControl1.Engine.SourceListSet.Add("MyChildTable", childTable); this.gridGroupingControl1.Engine.SourceListSet.Add("MyGrandChildTable", grandChildTable); this.gridGroupingControl1.DataSource = parentTable;Please let me know if this helps you.
Regards,
Jeya Preetha M
hello,
thank you for your answer.
that is what i did, and it works,
but i cant make a column to be a link.
how can do that?
Hi Jone,
http://www.syncfusion.com/downloads/Support/DirectTrac/98078/LinkLabelCell-1466590518.zip
Here is the code to assign the custom cell as celltype for a specific column
this.gridGroupingControl1.TableModel.CellModels.Add("LinkLabel",new LinkLabelCellModel(this.gridGroupingControl1.TableModel));
this.gridGroupingControl1.TableDescriptor.Columns[Column name].Appearance.AnyRecordFieldCell.CellType = "LinkLabel";
Kalai