none
Why does my form1.cs [Design] stop working ? RRS feed

  • Question

  • I put a dataGridView on my form & go through the wizard to hook it up to an access database; fine, I run it & my data is there on the form.

    I decide its a good idea to do a save all ... it asks me if I want to create a folder (as usual) I say yes ... great it is saved & still runs fine.

    But when I try to go back to form1 design screen I get a warning/error screen saying Cannot access a disposed object. Object name: 'FileCodeModel'.

    Is there a quick & easy way to get this error to go away ?

    I did exactly the same thing yesterday & the erros were worse ... it didnt seem to know where to save the form & then had lost the data set & table adapters.

    I could go on ... If you hook up to an access database with lots of tables then the data does not come up on the form ... which of course is easily solved ... save the one table you want as another database & hook up to that!

    Anyway ... what do I need to do to restore design mode ? ... Thanks in advance

    Oh yes ... this is on Microsoft Visual Studio 2012 ... on a c# form.

    Friday, September 7, 2012 12:06 PM

All replies

  • Hi DeFlatCoda,

    Could you please post the entire error message here?

    Does the error in designer show the line number?

    If you hook up to an access database with lots of tables then the data does not come up on the form ... which of course is easily solved ... save the one table you want as another database & hook up to that!

    Do you mean that if the datagridview columns will not display if the dataset contains too many tables?

     what do I need to do to restore design mode ?

    The best way is finding and solving the error。 You can also click ignore and continue to ignore this error message. However, this is not recommended.

    Could you please show us how can we reproduce this issue steps by steps or can you share us a demo to reproduce this issue?

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 10, 2012 3:22 AM
    Moderator