BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void Form1_Load(object sender, System.EventArgs e)
{
dataset11.Loadtag_Record.AddLoadtag_RecordRow(1, "123", 1, 1);
dataset11.Loadtag_Record.AddLoadtag_RecordRow(2, "456", 1, 1);
dataset11.Loadtag_Data.AddLoadtag_DataRow(dataset11.Loadtag_Record[0], 1, "1");
dataset11.Loadtag_Data.AddLoadtag_DataRow(dataset11.Loadtag_Record[0], 2, "2");
dataset11.Loadtag_Data.AddLoadtag_DataRow(dataset11.Loadtag_Record[1], 3, "3");
dataset11.AcceptChanges();
gridDataBoundGrid1.DataSource = dataset11.Loadtag_Record;
////// Syncfusion.Windows.Forms.Grid.GridHierarchyLevel lvl = gridDataBoundGrid1.Binder.AddRelation(dataset11.Loadtag_Record.ChildRelations[0].RelationName);
////// Syncfusion.Windows.Forms.Grid.GridBoundColumn parentColumn = new Syncfusion.Windows.Forms.Grid.GridBoundColumn();
////// parentColumn.MappingName = "OrderID";
////// parentColumn.HeaderText = "OrderID";
////// gridDataBoundGrid1.GridBoundColumns.Add(parentColumn);
// Without next 4 lines grid works, but displays all 4 columns,
// What to do if I want only one?
////// Syncfusion.Windows.Forms.Grid.GridBoundColumn childColumn = new Syncfusion.Windows.Forms.Grid.GridBoundColumn();
////// childColumn.MappingName = "LoadNumber";
////// childColumn.HeaderText = "LoadNumber";
////// lvl.GridBoundColumns.Add(childColumn);
Syncfusion.Windows.Forms.Grid.GridHierarchyLevel lv0 = this.gridDataBoundGrid1.Binder.RootHierarchyLevel;
lv0.LayoutColumns(new string[]{"OrderID"});
Syncfusion.Windows.Forms.Grid.GridHierarchyLevel lvl = gridDataBoundGrid1.Binder.AddRelation(dataset11.Loadtag_Record.ChildRelations[0].RelationName);
lvl.LayoutColumns(new string[] {"LoadNumber"});
////// gridDataBoundGrid1.Binder.InitializeColumns();
gridDataBoundGrid1.Refresh();
}