VB.Net Data Grid with Footer
-
Is it possible to have a footer row in VB.Net WinForm. I want to total some columns in a data bound datagrid.
Hi :) There's no special "footer"-feature in the standard DataGridView. The easiest way to add it would be by adding a second DataGridView below the first one, showing no headers and containing only a single row. You might also want to move the summing-calculation to the database, binding the second grid to it's own query in which you collect the
SUM
for the columns you requested in the first query.I are Troll :suss:
-
Hi :) There's no special "footer"-feature in the standard DataGridView. The easiest way to add it would be by adding a second DataGridView below the first one, showing no headers and containing only a single row. You might also want to move the summing-calculation to the database, binding the second grid to it's own query in which you collect the
SUM
for the columns you requested in the first query.I are Troll :suss:
-
I'd recommend you to create your own control inherited form DataGrid. It should consist of a DataGrid and your footer (you can create it of textboxes, labels, datagrids etc.) I feel it is nice solution, because you can always replace your component with another one implementing your IDataGridWithFootter. Regards