Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a DataGrid one of the column is Print.
In that rows are like this A0,A1,...

Now i want to diplay Total of A0, total of A1.... in to my DataGrid Footer

Can any one help me to do this.

I'm newly used this DataGrid control.


thanx in advance....
Posted
Updated 14-Sep-12 20:54pm
v2
Comments
[no name] 15-Sep-12 2:31am    
can u clear ur question
[no name] 15-Sep-12 2:52am    
I have a datagrid in that one of the col is PRINT, in that a column rows are like this A0,A1,A2....
I want to dispaly Total of A0,Total of A1...
in to my datagrid Footer

1 solution

try it



decimal sum;
sum = 0
for (int i,i = 0 to datagridview1.rows.count -1 ,i++)
{

sum += datagridview1.rows(i).cells("name of ur column").value

}


datagridview1.rows.add(sum,"","","")
 
Share this answer
 

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