J
JimLad
Hi,
I have a listview on a page which binds to an objectdatasource which
returns a typed datatable as the select command. There are also
Update, Insert and Delete commands.
I need to display the sum of a couple of these columns and a max and
min of another column.
What is the best way of doing this?
I could:
- Hack around with the listview.
- Run Compute on the datatable.
- Run separate aggregating sproc on the source database.
The middle one seems to be best but I can't see how to get access to
the datatable without causing another call to the database
(essentially calling GetData twice on the tableadapter - once manually
and once thropugh the automated databind). The datatable is not
accessible from the listview or the objectdatasource as far as I can
tell (databind is handled automatically and I don't really want to do
it manually).
Thanks in advance for any help.
James
I have a listview on a page which binds to an objectdatasource which
returns a typed datatable as the select command. There are also
Update, Insert and Delete commands.
I need to display the sum of a couple of these columns and a max and
min of another column.
What is the best way of doing this?
I could:
- Hack around with the listview.
- Run Compute on the datatable.
- Run separate aggregating sproc on the source database.
The middle one seems to be best but I can't see how to get access to
the datatable without causing another call to the database
(essentially calling GetData twice on the tableadapter - once manually
and once thropugh the automated databind). The datatable is not
accessible from the listview or the objectdatasource as far as I can
tell (databind is handled automatically and I don't really want to do
it manually).
Thanks in advance for any help.
James