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
Nitol Biswas
NA
37
1.5k
Can not sum GridView column with a variable
Dec 11 2016 1:52 AM
I want to sum GridView column value with a variable and show the result in second column. I am trying to do this.But when I convert the GirdView column into an integer the following
"
Input string was not in a correct format.
" Error is occuring.
Please help.
Here is my C# code:
for (int i = 0; i < GridView1.Rows.Count; i++)
{
long sum = openingBalace + Convert.ToInt64((GridView1.Rows[i].Cells[6].Text));
GridView1.Rows[i].Cells[8].Text = sum.ToString();
}
Thanks
Reply
Answers (
4
)
How do you allow edit of a field that is linked to a ddllist
Can we overload controller in mvc? How?