Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Datagrid not updated during delete, but updated during insert and update (http://www.velocityreviews.com/forums/t759551-datagrid-not-updated-during-delete-but-updated-during-insert-and-update.html)

Dmitry Korolyov 09-22-2003 10:57 AM

Datagrid not updated during delete, but updated during insert and update
 
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?

--
Dmitry Korolyov,
d__k@nosmapformorons.mail.ru
To e-mail me, remove "nospamformorons".




All times are GMT. The time now is 04:46 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.