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
kiran kamble
NA
118
1.5k
How can i do runtime calculation in gridview
Nov 17 2016 12:50 AM
int R,Q,T=0;
protected void Gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
TextBox txtRate = (TextBox)e.Rows.FindControl("txtRate");
TextBox txtQuantity = (TextBox)e.Rows.FindControl("txtQuantity");
TextBox txtTotal = (TextBox)e.Rows.FindControl("txtTotal");
int R = int.Parse(txtRate.Text);
int Q = int.Parse(txtQuantity.Text);
T += Convert.ToInt32(R * Q);
txtTotal.Text = T.ToString();
}
}
its showing FormatException was unhandled by user code and input string was not in coorect format and sir this calculation is not working on runtime, because database table is empty and i want to enter the number in runtime, if i enter Quantity "1" and Rate "200" then im pressing the tab i want result in next column
Attachment:
GridCalculation.rar
Reply
Answers (
2
)
Uncaught TypeError: Cannot read property 'substr' of undefin
how to use paypal ipn code c#