Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Dmitry Korolyov #1
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,
[email]d__k@nosmapformorons.mail.ru[/email]
To e-mail me, remove "nospamformorons".
Dmitry Korolyov Guest
-
Updated template in DW, how do I update the pages on thesite?
Hi This is probably a dumb question: I have updated the template of the site I am working by adding another tab to the global navigation in DW.... -
Play effect when row updated in DataGrid
I have a DataGrid that contains N number of rows. When one of the rows is updated I'd like to play some sort of effect to highlight the fact that... -
Get updated values from DataGrid
Hi I have a DataGrid, with Edit links in each row. The Edit button works, the user can change the values. But I can't get updating to work. ... -
DataGrid: OnUpdateCommand - getting the updated values
Greeting all, I have been reading a number of posts and all the samples I have seen are the same, yet I can't access the updated values of a... -
Imported + updated symbols don't stay updated
Hi everybody. I apologize for posting a question that probably any newbie should know, but ... I'm a rank Fireworks newbie. My problem is that the... -
Saravana #2
Re: Datagrid not updated during delete, but updated during insert and update
Bind the datagrid after deleting the record from the database. This should solve your problem.
--
Saravana
Microsoft India Community Star,MC**
[url]www.extremeexperts.com[/url]
"Dmitry Korolyov" <d__k@nospamformorons.mail.ru> wrote in message news:uG8JtpPgDHA.2172@TK2MSFTNGP09.phx.gbl...
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,
[email]d__k@nosmapformorons.mail.ru[/email]
To e-mail me, remove "nospamformorons".
Saravana Guest
-
Dmitry Korolyov #3
Re: Datagrid not updated during delete, but updated during insert and update
I am binding it after closing connection, which also means after deleting the record.
By the way, I've just created a blank web form (now not using designer), and migrated all my code there, creating connection, dataset etc objects manually withing the code. It works. Old one (created by visual designer) still shows that ugly delete lag.
--
Dmitry Korolyov,
[email]d__k@nosmapformorons.mail.ru[/email]
To e-mail me, remove "nospamformorons".
"Saravana" <saravank@sct.co.in.nospam> wrote in message news:ua8aLkQgDHA.3324@TK2MSFTNGP11.phx.gbl...
Bind the datagrid after deleting the record from the database. This should solve your problem.
--
Saravana
Microsoft India Community Star,MC**
[url]www.extremeexperts.com[/url]
"Dmitry Korolyov" <d__k@nospamformorons.mail.ru> wrote in message news:uG8JtpPgDHA.2172@TK2MSFTNGP09.phx.gbl...
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,
[email]d__k@nosmapformorons.mail.ru[/email]
To e-mail me, remove "nospamformorons".
Dmitry Korolyov Guest
-
Saravana #4
Re: Datagrid not updated during delete, but updated during insert and update
Can you send your code. We can look into that...
--
Saravana
Microsoft India Community Star,MC**
[url]www.extremeexperts.com[/url]
"Dmitry Korolyov" <d__k@nospamformorons.mail.ru> wrote in message news:OHqqnwRgDHA.632@TK2MSFTNGP10.phx.gbl...
I am binding it after closing connection, which also means after deleting the record.
By the way, I've just created a blank web form (now not using designer), and migrated all my code there, creating connection, dataset etc objects manually withing the code. It works. Old one (created by visual designer) still shows that ugly delete lag.
--
Dmitry Korolyov,
[email]d__k@nosmapformorons.mail.ru[/email]
To e-mail me, remove "nospamformorons".
"Saravana" <saravank@sct.co.in.nospam> wrote in message news:ua8aLkQgDHA.3324@TK2MSFTNGP11.phx.gbl...
Bind the datagrid after deleting the record from the database. This should solve your problem.
--
Saravana
Microsoft India Community Star,MC**
[url]www.extremeexperts.com[/url]
"Dmitry Korolyov" <d__k@nospamformorons.mail.ru> wrote in message news:uG8JtpPgDHA.2172@TK2MSFTNGP09.phx.gbl...
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,
[email]d__k@nosmapformorons.mail.ru[/email]
To e-mail me, remove "nospamformorons".
Saravana Guest



Reply With Quote

