Is there a way to add a column footer in a datagridview which is not databound? I am using it to take user input for adding inventory. Currently I am using a label to display the total, but I want to change it to footer if possible.
Is there a way to add a column footer in a datagridview which is
Share
I ran into the same problem previously and after a long search I realised;
Winform Datagridview do not support adding footer to it.
I tried adding an extra row that could hold the summary but still did not work out fine.
You can create a user control that has two grids and with the lower grid holding the summary.
Solution–

My solution that used data binding.(1)-I Create an abstract object Item with (Name, Cost) properties.(2)-I Create a Concrete item i.e ConcItem that inherit Item(3)-I create a footer item i.e FooterItem that also inherits Item(4)-A collection of Items i.e ItemList where you instantiate the footer item.(5) Finally, just before you do data binding call the method that adds the footer item.