Looking for sample app the uses data binding with a grid control and textboxes

emaduddeen

Well-known member
Joined
May 5, 2010
Messages
171
Location
Lowell, MA & Occasionally Indonesia
Programming Experience
Beginner
Hi Everyone,

I'm looking to see if anyone has a sample app or has a link to such an app that uses data binding with a grid control and textboxes and is able to insert, change and delete from a datatable which gets updated to a sql server database.

I have done an app that has the grid control and the textboxes already and is able to change and delete from the datatable and that action is reflected in the grid control because it has the datatable as the binding source.

The problem I'm having is when the user tries to insert into the datatable I get a concurrency violation error when using the .Update statement to save the changes to the database. This is happening because I don't know exactly how to get those inserts synchronised correcly.

I'm sure I'm also doing the processing wrong but here is what I'm doing.
When the user clicks an insert button I insert a new row into the datatable. The user now has the ability to enter text into the textboxes. When the user is finished doing that the user can click the save button which issues a .Update statement. That's where the error is displayed.

If you have the type of sample app I'm looking for I can see how to insert into the datatable and do the .Udate correctly.

Thanks in advance.

Truly,
Emad
 
Last edited:
Back
Top