View a table with headers and footers

  • Thread starter Thread starter Markus Eßmayr
  • Start date Start date
M

Markus Eßmayr

Hello,

I'm currently implementing an application which should display in a table.
But not just a table like a ListView or a DataGrid, the table should have a
footer row too.
That means, there are headers, like the ones the other controls have, below
follow the rows and on the bottom of the table, a footer row is displayed.
The footer row must (like the headers) always be visible, while the rows
between header and footer can be scrolled by the user.

Has anyone of you an idea, how to implement this feature best?

Thanks very much!

Max
 
Markus Eßmayr said:
Hello,

I'm currently implementing an application which should display in a table.
But not just a table like a ListView or a DataGrid, the table should have a
footer row too.
That means, there are headers, like the ones the other controls have, below
follow the rows and on the bottom of the table, a footer row is displayed.
The footer row must (like the headers) always be visible, while the rows
between header and footer can be scrolled by the user.

Has anyone of you an idea, how to implement this feature best?

Thanks very much!

Max

Hi Max,

Unfortunately there is no footer support for Windows grids. There may be
third party controls having this feature, but if that isn't an option you
need to simulate the footer in some way or other. If horizontal scrolling
and column resizing isn't needed you can add a set of Labels, TextBoxes or
similar at the bottom of a DataGridView and fill them with the necessary
footer data. If you want scrolling or resizing (or maybe the best visual
effect) then your best option is to add a second DataGridView at the bottom
containing one row and match the scrolling/resizing of the top DataGridView.
You may have to disable the scrollbars in the DataGridViews and add your own
HScrollBar/VScrollBar and scrolling algorithms.
 
Back
Top