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 along with Enable adding, Editing, Deleting & column ordering all all ticked
Loading
Bill GatesPosted Feb 27, 2010, 5:56 PM
For datagridview, its compulsory for you to have one Primary key in the database.
Also please see this:
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/666835a2-50ec-415f-ba30-bb80ca51c91b
Try it out and let me know if you have any problem.