Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Sort array of strongly typed DataRows

Avatar of ElrondCT
ElrondCTFlag for United States of America asked on
Visual Basic.NET
3 Comments1 Solution424 ViewsLast Modified:
I'm sure I'm missing something obvious, but I can't figure out how to sort an array of DataRows that have been drawn from a DataTable. I'm getting the child rows for a particular parent record using

dim drChildA() as dsSet.ChildARow = drParent.GetChildARows

I want to sort these rows, because I can't be certain they were entered in the proper order. (The primary key is a simple counter that's autoincremented for every new record, so it's not useful for this purpose.)

It seems to me there ought to be a way to choose a particular field (or fields) of the DataRow to use to sort, but I can't figure out how to put that into the structure of the Array.Sort method short of defining my own IComparer; I can do that, but it seems like it ought to be reinventing the wheel.
ASKER CERTIFIED SOLUTION
Avatar of graye
grayeFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers