Groups | Blog | Home
all groups > vb.net controls > july 2005 >

vb.net controls : Help regarding listview in vb.net


trialproduct2004 NO[at]SPAM yahoo.com
7/8/2005 2:47:46 AM
Hi all
i am having problem in listview which i am using in vb.net
applicication. I am getting following two errors.
There are not freqent errors but if i run my app for nearly 30 min
then these errors are coming. So i am not gettng exact scenarion for
these errors.

At a time of calling method items.clear i am getting error that
'error :- can not obtain value'.
And listview is not getting cleared.
Can some one tell me reason behind this problem

Similarly sometime my application is giving error that
'object reference not set to an instance of object' at a tome of
calling listview1.sort method.
I have used listviewitemsorter properly and icomparer.

Can some one tell me why this is happending.

Please help me.
Thanks in advance.
Crouchie1998
7/8/2005 11:26:18 AM
How are you declaring the ListView & the Sorter? Are you using the 'New'
keyword?

Crouchie1998
BA (HONS) MCP MCSE

Inge Henriksen
7/8/2005 12:26:26 PM
If this is in debug mode then try and start the program in release mode. If
the bugs happend quicker then it is probably the garbage collector that is
deleting your objects. It will happend earlier in release mode as it
utilizes a more efficient garbage collection. If this is the case then you
shold try and find out if any of these object goes out of scope somewhere in
your code.

<trialproduct2004@yahoo.com> skrev i melding
news:1120816066.936991.13180@g14g2000cwa.googlegroups.com...
[quoted text, click to view]


trialproduct2004 NO[at]SPAM yahoo.com
7/8/2005 10:35:44 PM
Hi.
thanks for your reply.
You are right.
I am using sorter and listview as well as i am using new.
Can u tell me why this is happening.
PLease help me.
Thanks
AddThis Social Bookmark Button