Datagrid not updated during delete, but updated during insert and update

D

Dmitry Korolyov

Hello everyone.

A test webform here, single datagrid bound to one table through dataset, and controls to delete, update and insert data. The code is built upon the samples from Quickstarts. The problem is: when you perform a delete operation, the data (single row) is deleted just fine, however, the datagrid on the webform is not updated. Well actually, it is updated, but a one-step delay occurs. I.e. when you select the record "a" and hit delete, it is deleted but still shown in the datagrid, when you then select record "b" and hit delete, the data grid no longer shows record "a" but still shows record "b", etc.

Insert an Update actions work fine - ie changes are immediately reflected in the datagrin on a webform. I am using the same dataset update methods for both insert, update and delete webform events, so it's weird why only delete goes fishy. The methods called after each update are:

mysqldataadapter.Fill(mydataset, "mytable");
mydatagrid.DataBind()


Any ideas here?
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top