gridview has columns
1st column is quantity
2nd column is unit cost
3rd column is total (quantity * unit cost)
user enters all items
how do i bind the 3rd column to the gridview
Bind user input from column to gridview
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Roei BarRank #1,271 · 1.4K reputationPosted Sep 1, 2009, 2:54 PM EDT
protected void GDVDates_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex < 0) return; // when e.Row.RowIndex is -1, it`s HeaderText e.Row.Cells[3].Text = Convert.ToInt32(e.Row.Cells[1].Text).ToString() + " - " + Convert.ToInt32(e.Row.Cells[2].Text).ToString(); e.Row.Cells[1].Text = Convert.ToInt32(e.Row.Cells[1].Text).ToString(); e.Row.Cells[2].Text = Convert.ToInt32(e.Row.Cells[2].Text).ToString(); }michael creek3 reputationPosted Sep 2, 2009, 4:24 AM EDT
I can get the values in the code behind using:
TextBox r1c7 = (TextBox)row.Cells[5].FindControl("txtamount"); for example
but how do I set the Text value in the asp.net, i.e.,
Text='<%# Bind("[whatgoeshere]") %>'>