Results 1 to 3 of 3

Thread: update data from datagridview to database

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Posts
    2

    Angry update data from datagridview to database

    Hi guys,

    My datagridview is displaying records from table in database.When I go to add a new record the 'pencil' icon does not appear so when I click on save button update to database table does not take place.

    code behind save button is

    BindingContext(TheatreBindingSource).EndCurrentEdit()
    PatientTableAdapter.Update(TheatreDataSet)
    PatientTableAdapter.Connection.Close()

    i have spent all day trying to sort this ...any ideas and yes my theatrebindsource.allownew is set to true

    Trudy1

  2. #2
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: update data from datagridview to database

    do you have editing enabled on the dgv in design mode? (if you click the DataGridView you will see a triangle in the top right of it)
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Posts
    2

    Re: update data from datagridview to database

    Hi Megalith

    Enable adding, Editing, Deleting & column ordering all all ticked ...any other ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width