private void Form1_Load(object sender, EventArgs e) { _flex = new C1FlexGrid(); _flex.Dock = DockStyle.Fill; this.Controls.Add(_flex); OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\ComponentOne Samples\\Common\\C1NWind.mdb"); DataTable ordersTable = new DataTable(); new OleDbDataAdapter("Select * from Orders", con).Fill(ordersTable); _flex.DataSource = ordersTable; _flex.GroupDescriptions = new GroupDescription[] { new GroupDescription("ShipCountry",null, true), new GroupDescription("ShipCity", System.ComponentModel.ListSortDirection.Ascending, true) }; _flex.Tree.Column = 1; _flex.Tree.HandleInvisibleChildren = true; _flex.Tree.Indent = 30; _flex.Tree.LineColor = System.Drawing.Color.Blue; _flex.Tree.LineStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot; _flex.Tree.NodeImageCollapsed = Properties.Resources.expand; _flex.Tree.NodeImageExpanded = Properties.Resources.collapse; _flex.Tree.Style = TreeStyleFlags.SimpleLeaf; _flex.Tree.Show(0); }
System.Object
C1.Win.C1FlexGrid.GridTree