Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB ASP.NET SQL VB.NET
please help me
 
i am trying for
 
http://www.gregorylane.com/article.aspx?ID=1
 
but unable to get the out put
 
i.e please see the subtotal
every column has it's own total at bottom cell
 
same way i was trying
 
below link gives output
 
http://blog.codovations.com/2009_05_01_archive.html
 
but it's providing subtotal in merged way
Posted 5-Feb-13 16:41pm
Comments
Adam R Harris at 5-Feb-13 21:48pm
   
You need to give us more information on what exactly the problem is as well as post your code samples. Please use the Improve question button to update your question.
mani.kishore.asp.net at 5-Feb-13 21:59pm
   
i have 3 columns
 
names english marks maths marks
 
if both names are same like
 
a 20 marks 30 marks
a 15 marks 10 marks
 
i am trying for output to be like
35 marks 40 marks at bottom of their respective columns.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

HI,
 
You can use like the following.
 
decimal a=0, b=0, c=0;
 
for (int i = 0; i < (gridview1.Rows.Count); i++)
           {
               a = Convert.ToDecimal(gridview1.Rows[i].Cells["Column Index"].Text.ToString());
               c = c + a; //storing total qty into variable
}
 

Thanks
  Permalink  
Comments
mani.kishore.asp.net at 5-Feb-13 21:56pm
   
how to display at bottom of the column..
mani.kishore.asp.net at 5-Feb-13 22:07pm
   
my code has grouped the grid view, for each group total to be assigned.
i have 3 columns
 
names english marks maths marks
 
if both names are same like
 
a 20 marks 30 marks
a 15 marks 10 marks
 
i am trying for output to be like
35 marks 40 marks at bottom of their respective columns.
 
next for b marks
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100