My application is collecting data from a database based on various criteria. The problem is that sometimes there is duplicate data in my data table (which is ok, since some are suppose to be duplicated).
What I want to do is scan through the data table and collect information from each instance of the same data (for example, based on part number and I want to collect quantity in stock) and then erase the extra ones and just display one with the total quantity.
Currently I'm taking the data table and sorting it before putting it into a gridview. But I'd like to do the above prior to putting it into the gridview if possible.
Is there an easy way to do this (or a hard way)?
What I want to do is scan through the data table and collect information from each instance of the same data (for example, based on part number and I want to collect quantity in stock) and then erase the extra ones and just display one with the total quantity.
Currently I'm taking the data table and sorting it before putting it into a gridview. But I'd like to do the above prior to putting it into the gridview if possible.
Is there an easy way to do this (or a hard way)?