Forums

ASP

This topic is locked

On load - reference datagrid data

Posted 26 Oct 2005 10:30:01
1
has voted
26 Oct 2005 10:30:01 Kevin Kidson posted:
I am trying to calculate column totals in an aspataGrid - In order to do this I need to reference the data that has been 'bound' to the datagrid
In my datagrid I call : OnItemDataBound="ComputeSum"
I then have a sub :Sub ComputeSum(sender As Object, e As DataGridItemEventArgs)
with
Dim Price as Double = <b>DataBinder.Eval</b>(e.Item.DataItem, "Price"
....
I have a dataset : &lt;MMataSet id="ds_Pack_Wine"
I have a datagrid : &lt;aspataGrid id="dg_PackWines"
DataSource="&lt;%# ds_Pack_Wine.DefaultView %&gt;"

How do I reference the data - databinder.eval is obviously not a DW method
Any ideas?

Reply to this topic