Any plans to add Footer row to DataGridView.
I would need to create a column totals, that are scrolling (following columns) as user is moving in GridView?
Thanx,
DiNo
Sorry for the late reply to your last comment. The sample is a starting point, it can be adapted as needed. You can access the summary grid using this.dataGrid1.SummaryGrid. For example, to sync column width when changed by code:
protected override void OnColumnWidthChanged(DataGridViewColumnEventArgs e) { this.childGrid.Columns[e.Column.Index].Width = e.Column.Width; base.OnColumnWidthChanged(e); }
We have also just published an extension that creates subtotal rows at various levels and positions (not frozen because they work on grouping). See https://wisej.com/extensions/
Added updated sample.
Here is a sample app with a composite grid and sync’d columns. See DataGridViewWithBottomRows.InitScript and CssStyle proeprties. You can use the same approach to add rows at the top or any child control to make up a composite grid.
We have to support frozen rows (top and bottom) on our todo list. Don’t have a date yet.
However, the Wisej DataGridView is also a container, you can drop other controls to it and use the Dock property to create a composite grid – and you can make them resizable (ResizableEdges) to act as it there was a splitter: i.e. toolbar, detail grid, navigation tree, etc.
You could add a second grid to the bottom without the column header and without the vertical scrollbar (see ScrollBars property) and then sync the column resize, move and horizontal scrolling on the client. You can also decide where to show the horizontal scrollbar.
We did this in our other framework for the Gupta/SQLWindows to Web migration and I can attach the javascript to sync the grids if you like the solution. You’d have to create the second grid with the same columns – could use the column.Clone() method for that.
Please login first to submit.