System.ObjectDisposedException

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • *shame-faced* via DotNetMonster.com

    #1

    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 "DatagridResult s.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.ObjectD isposedExceptio n' occurred in
    system.windows. forms.dll
    Additional information: Cannot access a disposed object named
    "DataGridTextBo x".

    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.c om
    Best online pokies for real money in Australia and learn about safety and game mechanics in this comprehensive guide.


Working...