Will Web 3.0 Replace Web 2.0?
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Sandy Surwase
1.9k
287
27.9k
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