Esempio n. 1
0
        /// <summary>
        /// binding Custom collection to the GridGroupingControl.
        /// </summary>
        private void SampleCustomization()
        {
            CustomerCollection customers = PopulateCustomers.CreateCustomers();


            this.groupingGrid1.DataSource = customers;

            GridEngine engine = this.groupingGrid1.Engine;

            engine.TopLevelGroupOptions.ShowCaption = true;

            GridRelationDescriptorCollection relations = new GridRelationDescriptorCollection();

            // First level
            GridRelationDescriptor rd = AddRelation("Level_0", relations);

            // Subsequent levels
            for (int level = 1; level < 5; level++)
            {
                rd = AddRelation("Level_" + level.ToString(), rd.ChildTableDescriptor.Relations);
            }
            this.groupingGrid1.TableDescriptor.Relations = relations;


            Syncfusion.Grouping.Diagnostics.IterateThroughNestedDisplayElement(this.groupingGrid1.Table);
        }
Esempio n. 2
0
        public Class1()
        {
            engine1 = new Engine();

            CustomerCollection customers = PopulateCustomers.CreateCustomers();

            this.engine1.SetSourceList(customers);

            RelationDescriptorCollection relations = new RelationDescriptorCollection();

            // First level
            RelationDescriptor rd = AddRelation("Level_0", relations);

            // Subsequent levels
            for (int level = 1; level < 5; level++)
            {
                rd = AddRelation("Level_" + level.ToString(), rd.ChildTableDescriptor.Relations);
            }

            this.engine1.TableDescriptor.Relations.InitializeFrom(relations);

            this.engine1.Table.ExpandAllRecords();
        }