Click here to Skip to main content
14,640,723 members
Rate this:
Please Sign up or sign in to 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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100