Profile Picture

Listview Sorting

Posted By Marcus McCallum 11 Years Ago
Author
Message
Marcus McCallum
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 29, Visits: 61
Hi,

I am using a the Listview control. I have created columns that can be sorted numerically. This all works well, until I come to refresh the data and add in new data. In some cases I then get this error

An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll

Additional information: '0' is not a valid value for 'index'.

Does anyone have any idea what is going on? I have tried to clear the extended columns before refreshing and adding in new data and then adding the extended columns in again, but this error still occurs. It seems to only happen when the listview has been refreshed and in that case the new listview doesn't have any data.

Basically I would like to know how can I get the listview to get backs to its original state before I clicked a column to sort, i.e., remove the sorting capability till the new data has been entered?

Thanks,

Marcus

Craig Swearingen
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 99, Visits: 654

Sorry I can't offer a work around suggestion but I saw this same exception a different way and reported it here:

http://forum.nevron.com/shwmessage.aspx?forumid=2&messageid=6454





Similar Topics


Reading This Topic