Advertisement

05.16.2008 at 08:19AM PDT, ID: 23408597
[x]
Attachment Details

Datatable - add rows together

Asked by Ireland75 in .NET, Visual Basic Programming, C# Programming Language

I have a Datatable which has 3 main columns.   These columns are Days, Department, ProjectorType.

NB The data is coming from another system that i have no control over so I can not manipulate the data before getting it into the Datatable.

For example, the datatable may contain -
2 - Sales - 55HP
5 - Sales - 12HP
4 - Sales - 55HP
3 - HR     - 55HP
2 - HR     - 55HP

I now need to create a cleaner datatable that shows only one entry per department for each projector type...therein showing its total days.

So the above example would change to -

6 - Sales - 55HP
5 - Sales - 12HP
5 - HR     - 55HP

I am not sure how to consolidate this info...so far i have been able to access each row but only remove them not add them together.

Any help much appreciated...

Start Free Trial
 
 
[+][-]05.16.2008 at 08:25AM PDT, ID: 21583573

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 08:52AM PDT, ID: 21583863

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 09:38AM PDT, ID: 21584256

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 01:36PM PDT, ID: 21586252

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.17.2008 at 03:30PM PDT, ID: 21590946

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Visual Basic Programming, C# Programming Language
Sign Up Now!
Solution Provided By: anyoneis
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628