I have a list of <string[]>
.
Added items would look like this
list.Add(new string[]{"1", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"2a", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"2", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"3a", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"3b", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"4", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"5", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"10", "A", "333", "666", "16.02.2013 03:00"});
list.Add(new string[]{"11", "A", "333", "666", "16.02.2013 03:00"});
After parsing data from file and adding them to List I have to show all data in DataGridView, and after adding all data to DataGridView I want to make user to able sort it by clicking on column header.
Problem is that if user will want to sort rows by first column it will sort like this
1 A 333 666 16.02.2013 03:00
10 A 333 666 16.02.2013 03:00
11 A 333 666 16.02.2013 03:00
2 A 333 666 16.02.2013 03:00
2a A 333 666 16.02.2013 03:00
3a A 333 666 16.02.2013 03:00
3b A 333 666 16.02.2013 03:00
4 A 333 666 16.02.2013 03:00
5 A 333 666 16.02.2013 03:00
but correct way would be this:
1 A 333 666 16.02.2013 03:00
2 A 333 666 16.02.2013 03:00
2a A 333 666 16.02.2013 03:00
3a A 333 666 16.02.2013 03:00
3b A 333 666 16.02.2013 03:00
4 A 333 666 16.02.2013 03:00
5 A 333 666 16.02.2013 03:00
10 A 333 666 16.02.2013 03:00
11 A 333 666 16.02.2013 03:00
How can I sort List of string arrays by specific index of array using natural sort?
I can't use LINQ