views:

291

answers:

2

hi

is it possible to make the last row of DataGridView as Sum the column ?

and that the last row always will show ?

thank's in advance

+4  A: 

Yes it is, see Summary DataGridView on codeproject.com

Jay Riggs
+2  A: 

To do this you have to set ShowFooter attribute of True

and then in code behind add your desire value in the footer


   <asp:GridView ID="grdList" runat="server" ShowFooter="True" >
   // other part of gridview codes e.g columns or blah blah blah
   </asp:GridView>

   // in code-behind
   int totalValue = 2 * 10;
   grdList.Columns[2].FooterText = totalValue.ToString();
Nasser Hadjloo
i cant find this attribute, where i can find it ?
Gold
@Gold I had update my post. Check it out.
Nasser Hadjloo
thank's alot !!, but i work on WinFormis it possible too ?
Gold