BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.gridGroupingControl1.ShowNavigationBar = false;
GridControl bottomGrid = new GridControl();
bottomGrid.Size = new Size(100, 100);
bottomGrid.Dock = DockStyle.Bottom;
this.gridGroupingControl1.GridTablePanel.Controls.Add(bottomGrid);
}
The next code makes use of the GridBounds property of GridControl and embeds the second grid inside the TableControl. Then the scrollbars are drawn as expected.
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
this.oleDbDataAdapter1.Fill(this.dataSet11);
this.gridGroupingControl1.Appearance.AnyCell.ImageSizeMode = GridImageSizeMode.CenterImage;
this.gridGroupingControl1.ShowNavigationBar = false;
GridTableControl tableControl = this.gridGroupingControl1.TableControl;
tableControl.GridBounds = new Rectangle(Point.Empty, new Size(tableControl.Width, tableControl.Height-100));
GridControl bottomGrid = new GridControl();
bottomGrid.VScrollBehavior = GridScrollbarMode.Disabled;
bottomGrid.HScrollBehavior = GridScrollbarMode.Disabled;
bottomGrid.Size = new Size(tableControl.Width, 100);
bottomGrid.Location = new Point(0, tableControl.Height-100);
bottomGrid.Dock = DockStyle.Bottom;
this.gridGroupingControl1.TableControl.Controls.Add(bottomGrid);
}
The next step here would be to override virtual methods for the second grid and provide summary data. Also, you would have to manually handle size events to correctly resize the bottom grid.
When I have some time I''ll look into this a bit further.
Stefan
public void SiteSummaryRow() { GridControlBase grid = groupingGrid.TableControl; grid.ResetGridBounds(); int sumGridHeight = this.summaryGrid.RowCount * grid.DefaultRowHeight; grid.GridBounds = new Rectangle(grid.GridBounds.X, grid.GridBounds.Y, grid.GridBounds.Width, grid.GridBounds.Height - sumGridHeight); int height = grid.GridBounds.Height + sumGridHeight; this.summaryGrid.Location = new Point(0, height - sumGridHeight); this.summaryGrid.Size = new Size(grid.ClientSize.Width, sumGridHeight); }