Private Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemCreated
If (e.Item.ItemType = ListItemType.Footer) Then
e.Item.Cells(2).Text = "Total "
e.Item.Cells(2).HorizontalAlign = HorizontalAlign.Right
Dim oTextbox As New TextBox
oTextbox.Width = New Unit(100, UnitType.Pixel)
oTextbox.Text = "90.3500" 'This can be changed to populate from some datasource.
e.Item.Cells(3).Controls.Add(oTextbox)
End If
End Sub