Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to know how can i sum quantity column in gridview and place it in first row...not in footer..in .net. Rply ASAP
Posted
Comments
choudhary.sumit 6-Dec-12 0:57am    
how you are filling your grid?
Member 9644258 6-Dec-12 1:05am    
through query with the help of join
Patel Shailendra 6-Dec-12 1:49am    
i want to know you want to show sum of quantity in gridview.

have a look at this example..
http://social.msdn.microsoft.com/Forums/eu/csharpgeneral/thread/52a66676-cffb-4ec7-821a-ec2d3deb90c0[^]

if it helps. mark me as a accepted!!
 
Share this answer
 
Comments
Member 9644258 6-Dec-12 1:42am    
I am not getting what exactly you want to show with this link
choudhary.sumit 6-Dec-12 1:44am    
it can help you to insert new row at 0 index after binding grid. in the first row you can have you desired column with the sum of the downwards value.
Member 9644258 6-Dec-12 2:07am    
I am not able to do so as i am not getting what is the purpose for adding a new row when i don't want that
There can be many way of doing this but one of then is:

You must be using Datatable at the end, to fill the GridView. Just add one row at the top of that datatable and calculate sum in the first for's column

I guess, this can solve your problem.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900