The DataTable has a Compute method, that can do this on a one by one product
basis.
However, that's not really a good substitute for a query with a GROUP BY.
The DataTable cannot do anything else for you - it is not an in memory
database engine. It is just an in memory set of data.
Your best bet is to go back to the database.
"Matthew" <PR********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have a DataTable loaded in memory that looks like this:
Product - Qty
1001 - 3
1001 - 5
1080 - 8
I need it like that, and I also need that data to look like this:
Product - Qty
1001 - 8
1080 - 8
Is there a way to GROUP BY Product?
Maybe by running a select query on that DataTable, or some kind of
DataView?
I would prefer not to go back to the database.
Thank you,
Matthew