Bind the datagrid after deleting the record from the database. This should solve your problem.
Microsoft India Community Star,MC**
"Dmitry Korolyov" <d__knospamformorons.mail.ru> wrote in message news:uG8JtpPgDHA.2172TK2MSFTNGP09.phx.gbl...
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:
Any ideas here?
To e-mail me, remove "nospamformorons".