want to do sum of all the estimated cost but from code behind not using design time . How to achieve this through code behind . I am trying to do this but it only the sum first five records in grid .
For Each ditim As GridDataItem In dgProposals.MasterTableView.Items
Dim fieldValue As Double = CDbl(ditim("Estcost").Text.Substring(0))
txtallproposal.Text = fieldValue + tm
tm = txtallproposal.Text
Next
For Each ditim As GridDataItem In dgProposals.MasterTableView.Items
Dim fieldValue As Double = CDbl(ditim("Estcost").Text.Substring(0))
txtallproposal.Text = fieldValue + tm
tm = txtallproposal.Text
Next