Hello,
I am working on a task in which I have to read line by line from a text file and add it to listview as an item. Since the file is too large (around 10K-15K lines), it was taking hell lot time to populate the ListView. So I used List<ListViewItem> as well I used VirtualListView property. Now it works absolutely fine.
Now my problem is, I have given an option to user using which he/she can select a file from Open File Dialog.
When user opens the file for the first time, everything goes fine. When user tries to open another file which is having different number of lines, ListView.RetrieveVirtualItem event fails giving some Array out of bound exception for e.ItemIndex in ListView.RetrieveVirtualItem handler. This failure happens especially when I try to scroll in a ListView.
Somebody...please help me out...it is very urgent.
Thanks in advance...!