index > Team Foundation Server - Version Control > GetItems for folders not sorted?

GetItems for folders not sorted?


I noticed some wierd behaviour in the GetItems method. I used ItemType.Folders and RecursionLevel.Full.

What I wanted to do was get a list of folders under a given root. I wanted to use this to create a windows app with a treeview which mimiced the TFS Source Control Explorer.

But the list of folders returned is not sorted. It was trivial to export the folder names to an array and then sort it, but this seems like a bug?
DQM

Please direct this question to the Version Control forum.

Patrick

Patrick Carnahan - MSFT

The GetItems method sorts the items by default, unless you pass in GetItemOptions.Unsorted. Are you using the overload below?

public ItemSet[] GetItems(ItemSpec[] itemSpecs, VersionSpec version, DeletedState deletedState, ItemType itemType, GetItemsOptions options)

Thanks




Chandru R - MSFT
Chandru R - MSFT
reply 3

You can use google to search for other answers

 

More Articles

Retrieving the workitem delta between two labels
Adding CC list to work item/bug?
The underlying connection was closed
Testing Tool of Microsoft Team foundation server?
Source Control Disabled
File Date in TFS-VC
ServerMap.xml issue?
Writing Filters (VSEFL)
Changesets newbie
TF60032: The VSS Converter requires Visual Sourcesafe 2005... HE...
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Team projects placed in folders
File Recovery in TFS
Team Foundation Version Control WITHOUT …
Check out files status
get lastest problem (didn't get all file)
Problem moving source from one server to…
Restrict access to all top level folders…
A branch has been deleted but tf get sti…
Shelveset manipulation
Best Practices
Problem branching on TFS server
Question on Team Foundation Server Versi…
History information doesn't show up afte…
unshelving changes
Branching, Label, Merging - examples.

Hot Articles

Branc Specifications
Get Latest Version on a Network path doe…
Copy source control items with history
Shelved Code during a Merge
New Projects do not get retrieved on get…
What is the responsibility of tbl_Works…
Adding a solution with multiple websites…
Unit Testing a Checkin Policy
Error: TF60059 Incremental Migration TF…
Really Delete from Source Control
Can't delete folder from the Source Cont…
Sourcecode corruption
Can I modify behaviour of get operation …
Visual Studio "Check In" ticks…
Recover files directly from TfsVersionCo…

Recommend Articles

Version vs Changeset
One big team project, or Eight small ones?
Stored Procedure Source Control
TreeDiff - another usefull entry point f…
New Projects do not get retrieved on get…
Project files of our solution are automa…
Merge by WI
Error when merging in TS
IIS Virtual Directory and Team Suite Bra…
Searching Team Foundation source control
Adapting source control to non-conforman…
Approval check-inpolicy
Remapping solutions to folders
Undoing exclusive checkouts
Apply Label applies label