Add subtotal row to datagrid

A

Anon

hi,

i need to subtotal a column in a datagrid and display the result. I have
come to a point where i can subtotal the columns in the datagrid but cannot
display the result.

ex.
Private Sub dgTimesheet_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgTimesheet.ItemDataBound
If e.Item.Cells(4).Text().GetType Is GetType(System.Double) Then
subtotal += Double.Parse(e.Item.Cells(4).Text())
End If
End Sub

my question is how do i know when the datagrid has finished binding and then
add a literal at the bottom of the grid and display the subtotal.

thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top