Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting rows in a 2D array?

Status
Not open for further replies.

ProtocolPirate

Programmer
Nov 21, 2007
104
US
I'm loading a huge database table, so I have to change the DataGridView to virtual mode, which in turn means that automatic sorting won't work anymore and I have to implement it myself.

So I have a cache that is a 2D array of grid values. Unfortunately, sorting is only support on 1D arrays. So what would be a good way to implement row-by-row sorting of a 2D array, based on the value of only one column?

Should I implement this as an array of arrays instead of as a monolithic 2D array?
 
You really shouldn't double post a question, you should just add the additional attempt to solve the problem to the end of the first post.

-Sometimes the answer to your question is the hack that works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top