Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Tue Aug 26, 2008 5:53 pm Post subject: HOWTO: Sort items programmatically |
|
|
Use the SortByColumn method to programmatically sort items as shown below:
[C#]
fileview1.SortByColumn("Name",-1,SortOrders.Ascending); // Sort by 'Name' in ascending order
[VB.Net]
fileview1.SortByColumn("Name",-1,SortOrders.Ascending) 'Sort by 'Name' in ascending order
The same method can also be used to toggle the sort order as shown below:
[C#]
fileview1.SortByColumn("Name",-1,SortOrders.Toggle); // Toggle sort order by 'Name'
[VB.Net]
fileview1.SortByColumn("Name",-1,SortOrders.Toggle) ' Toggle sort order by 'Name' |
|