Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Datagrid not updated during delete, but updated during insert and update

Reply
Thread Tools

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

 
 
Dmitry Korolyov
Guest
Posts: n/a
 
      09-22-2003
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,
http://www.velocityreviews.com/forums/(E-Mail Removed)
To e-mail me, remove "nospamformorons".


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling XML data (nodes and attributes) into datagrid for easy insert, update, delete luckyads ASP .Net 0 01-22-2009 02:03 PM
Pulling XML data (nodes and attributes) into datagrid for easy insert, update, delete luckyads ASP .Net 0 01-21-2009 09:04 PM
insert in std::map does not insert the object simon.elbaz@free.fr C++ 1 11-04-2007 11:42 PM
why I can't update data, but I can insert data into new mode OnRails Ruby Ruby 2 10-19-2007 11:49 PM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments