TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yesubabu k
1.1k
644
62k
sum of value not showing
Jul 3 2018 2:03 AM
dear sir,
i have a gridview in windows application form in that ihave a checkbox for selecting the row and also its contains Amount field
when i select first checkbox in gridview it is not showing the value at label
here is my code:
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
//try
//{
decimal TotalValue = 0.0m;
for (int i = 0; i < dataGridView1.Rows.Count; ++i)
{
if (Convert.ToString(dataGridView1.Rows[i].Cells[0].Value) == "1")
{
TotalValue += decimal.Parse(dataGridView1.Rows[i].Cells[7].Value.ToString());
}
else
{
}
}
lblInvoiceamt.Text = TotalValue.ToString();
//}
//catch (Exception ex)
//{
//}
}
Reply
Answers (
3
)
google translator
Itext pdf print after selection index changed in combobox?