Im trying to add data into a new column I have created in my gridview. I create the column with the code below:
Dim Field As New BoundField Field.HeaderText = 'Cummulative Amount' Dim Col As DataControlField = Field Me.GridView1.Columns.Add(Col)
Now I need to go in and add data for the rows below the column. I have seen ppl saying I need to set it equal to a datafield but how do I create a datafield from scratch then?
Thanks in advance,
Update:
You can create this calculated column right in the markup for the gridview. Assuming that your datasource has an Field named ‘Amount’ and another field named ‘Quantity’ and that your ‘Cummulative Amount’ is a product of those two columns, you could do something like this: