How to edit, delete and modify rows - dataGridView

Discussion in 'ASP .Net' started by S_K, Jan 26, 2009.

  1. S_K

    S_K Guest


    I have a dataGridView where everything seems to be set up to add,
    modify and delete rows. However I can't get the dataGridView to
    actually SAVE THE CHANGES back to the database.

    Any help?

    S_K, Jan 26, 2009
    1. Advertisements

  2. Hi Steve

    take a look an example at
    or post your code here if you cannot find where your problem is.

    Hope this helps
    Alexey Smirnov, Jan 26, 2009
    1. Advertisements

  3. S_K

    Miro Guest

    Im assuming you dont have the

    or the acceptchanges()
    before your update button.

    Can you post some code?

    Miro, Jan 26, 2009
  4. S_K

    S_K Guest

    I'm just a newbee here. The dataGridView will allow me to change the
    data within the cells or add a new row, but the changes never get to
    the database. I read the example on the MSDN but it dosen't seem to
    have anything on updating the database.

    What do you mean "or the acceptchanges()
    before your update button. "??? I don't see any acceptchanges() method
    in the dataGridView events!?

    Thanks again for your help.
    S_K, Jan 27, 2009
  5. Here's more advanced example

    Please let me know if you have any questions
    Alexey Smirnov, Jan 27, 2009
  6. S_K

    S_K Guest

    I've been doing some reading....
    Is it true that a DataGridView (versus a GridView) is only READING the
    data? Thus no editing/deleting possible?
    The more advanced example only applies to the ASP.NET GridView....

    Thanks again for your help..

    S_K, Jan 27, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.