| |

VerySource

 Forgot password?
 Register
Search
View: 689|Reply: 2

About bindingnavigator deleting data is an exception

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-31 15:20:01
| Show all posts |Read mode
I generated a dataset in the project and then used it to generate a datagridview and bindingnavigator in the window. Both are automatically generated. When using the navigation bar to insert a new entry into the database, there is no problem, but the delete button on the navigation bar deletes the data and then An exception occurred when pressing the save button to save
The description of the exception is
System.InvalidOperationException: Update requires a valid DeleteCommand when passed DataRow collection with deleted rows.

Does the expert know what's going on, please give me some pointers, very anxious, thank you
Reply

Use magic Report

1

Threads

7

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-10 17:15:01
| Show all posts
DeleteCommand is not defined or has a syntax error
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-3-30 16:00:02
| Show all posts
Everything is generated automatically. Where should I define the DeleteCommand? Is there any code for that?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list