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
Sandy Surwase
NA
287
30.4k
how to get column value in grid
Aug 8 2015 10:34 AM
<asp:TemplateField HeaderText="Total price">
<ItemTemplate>
<asp:Label ID="lbltotal" runat="server" Text='<%#Item.quantity*Item.price %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
this column i want in totalbill
protected void grdViewItem_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//totalbill += Convert.ToDecimal(e.Row.Cells[5].Text);
//totalbill += Convert.ToDecimal((Label)e.Row.FindControl("lbltotal"));
}
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[4].Text = "Total Amount";
System.Globalization.CultureInfo info = System.Globalization.CultureInfo.GetCultureInfo("hi-IN");
e.Row.Cells[5].Text = totalbill.ToString("c",info);
}
}
Reply
Answers (
3
)
responsive image in asp.net/css
Create Trial version Software in c# win form