Click here to Skip to main content
15,940,550 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
if (learnerDataGridView.Rows.Count > 0)

                txtNumberOfLearners.Text = Total().ToString("c");
        }
        private double Total()
        {
            double tot = 0;
            int i = 0;
            for (i = 0; i < learnerDataGridView.Rows.Count; i++)
            {
                tot = tot + Convert.ToDouble(learnerDataGridView.Rows[i].Cells["Gender"].Value);
            }
            return tot;
Posted
Comments
Toniyo Jackson 25-Jul-11 3:47am    
What is your problem?

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