This sample demonstrates how to select multiple records through code.

The following code shows how to add a group drop area for the related table.

                this.gridGroupingControl1.AddGroupDropArea("Orders");  

Here is the code used to expand records 2 and 4 and their nested tables.

                if (this.gridGroupingControl1.Table.Records.Count > 4 &&  this.gridGroupingControl1.Table.Records[2].NestedTables.Count > 0)
                {
                        this.gridGroupingControl1.Table.Records[2].IsExpanded = true;
                        this.gridGroupingControl1.Table.Records[2].NestedTables[0].IsExpanded =  true;
                        this.gridGroupingControl1.Table.Records[4].IsExpanded = true;
                        this.gridGroupingControl1.Table.Records[4].NestedTables[0].IsExpanded =  true;
                }  

Here is the code to select multiple records.

                Record r1 = this.gridGroupingControl1.Table.Records[5];
                Record r2 = this.gridGroupingControl1.Table.Records[4];
                Record r3 = this.gridGroupingControl1.Table.Records[8];

                Table t = this.gridGroupingControl1.Table;
                t.SelectedRecords.Add(r1);
                t.SelectedRecords.Add(r2);
                t.SelectedRecords.Add(r3);  

Here is the code to navigate the first record.

                 this.gridGroupingControl1.RecordNavigationBar.MoveFirst();

Here is the code to navigate the last record.

                   this.gridGroupingControl1.RecordNavigationBar.MoveLast();

Here is the code to navigate the next record.

                   this.gridGroupingControl1.RecordNavigationBar.MoveNext();

Here is the code to navigate the previous record.

                   this.gridGroupingControl1.RecordNavigationBar.MovePrevious();