469,590 Members | 2,467 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

System.ObjectDisposedException

dear all,

this is a slighly ridiculous thing to have done to my own code, but i've
managed it nonetheless - i call a form with a datagrid, to display search
results. everything was working fine.

i generally do the form closing events actions in the end, so just now, i
tried a "DatagridResults.dispose" along with a couple of other .disposes
thinking i was being tidy and not using up extra resources. then i realised
that my declarations were all in the main module so maybe that wasn't smart,
and so i undid all the disposes.

now, my search form loads correctly the first time, and then for the second
time i get this error:

An unhandled exception of type 'System.ObjectDisposedException' occurred in
system.windows.forms.dll
Additional information: Cannot access a disposed object named
"DataGridTextBox".

i've searched and searched, but i can't find a dispose statement anywhere!
what do i do? please help!!

thanks.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200704/1

Apr 19 '07 #1
0 911

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by TomPel | last post: by
reply views Thread by Richard Blewett [DevelopMentor] | last post: by
3 posts views Thread by Martin Pöpping | last post: by
2 posts views Thread by Bernard Borsu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.