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
Mohammed Nadeem
NA
78
9.4k
Getting sub total of nested gridview dynamic rows
Apr 19 2017 3:16 PM
i am working with nested gridview. where i am having textboxes(item,quantity,price ) and a bound field for total price(value is coming from multiplying previous columns) in nested gridview , where columns text is entered dynamically and calulated text from (item,quantity,price) is obtained in total price bound field . i need the sum of all rows(totalprice) in footer of nested gridview and grand total in label outside gridview.
What I have tried:
under nested gridiview rowdatabound event i have written this code its not working//
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int tmpTotal = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "txtTotalPrice").ToString());
qtyTotal += tmpTotal;
grQtyTotal += tmpTotal;
}
if (e.Row.RowType == DataControlRowType.Footer)
{
Label lblTotalprice = (Label)e.Row.FindControl("lblTotalprice");
lblTotalprice.Text = grQtyTotal.ToString();
}
}
Reply
Answers (
1
)
Removing single quotes for numeric value in string
Why these code can not send SMS to multiple once ONLY to one