Text sorting listbox and unbound datagridview

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am trying to sort text (File name and path), by having a listbox with just file name and and a datagridview with two columns filename and path.
The listbox sorts it differently from the datagridview. Mainly this is where there is a ie listbox puts "youre" before "you are" where the datagridview puts "you are" before "youre".
I thought I would just sort using datagridview and then read from datagrid and add to a non sorting listbox, but this did not work although the datagridview shows sorted, when you go through and a loop, reading each row to add to listbox they end up the
same order they where originally put into the datagridview befrore sorting.
Any ideas how to do this?
What I want is a sorted list of file names only, which will be obtained from several folders and then when clicked with be able to extract the complete path and filename.<br/>
I have code with a listbox and datagridview which works ok if I remove any files with in them.


View the full article
 
Back
Top