Answer: With the help of Sorting property of ListView we can sort any listview items.There is
SortOrder Enum of a Sorting property,which has Ascending,Descending and None values.By which we can sort our list-view in any order.
For Example:-
lst_view_fruit_names.Items.Add("Apple");
lst_view_fruit_names.Items.Add("Orange");
lst_view_fruit_names.Items.Add("Banana");
lst_view_fruit_names.Sorting = SortOrder.Descending;
Then,list-view has Orange,Banana and Apple.
Asked In: Many Interviews |
Alert Moderator