Exception of sorting a listview

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I use a listview to populate the data, and define a sorting direction with

Me.ListView1.Sorting = System.Windows.Forms.SortOrder.Ascending

so far no problem. As long as I add a new row into the listview
programatically
I got an error on sorting the data at above line:
System Argument Exception: '-1' is not a valid value for 'index'.

Anybody can give a hand?

Thanks in advance
 
Hi

I tried what you said. Added items in the listview, specified Sorting
property. Then added items again prohgramatically. I did'nt get any
exception. Can you give the source code?

Regards
Sooraj
Microsoft Community Star
 
Thanks Sooraj for your response. The codes are too long to analyse, I will
giveup this issue. I appreciate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top