>DataSet is disconnected.

Many thanks. 
What's the best approach then? Calling again the database QRY? Is there any
other option? Something like an update to the dataset when record is deleted
perhaps?

_________________________________
Claudio M. E. Bastos Iorio
http://www.blumersolutions.com


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of AstroDrabb
Sent: Sunday, April 12, 2009 12:54 AM
To: [email protected]
Subject: [DotNetDevelopment] Re: gridview.databind doesn't work


On Sat, Apr 11, 2009 at 3:54 AM, Claudio M. E. Bastos Iorio
<[email protected]> wrote:
> Hi, hope you guys can help me on this one.
>
> I have a gridview control, the data for this control comes from a dataset,
> created programmatically.
>
> I also have a delete an a edit button for each record.
>
> I can edit and delete records (also programatically), but the data is not
> refreshed on the gridview control.
>
> I tried the method gridview.databind() in the RowDeleting, RowDeleted
> events, in the postback (using IsPostback) and the data is never updated
in
> the gridview.
>
> Any idea?
>
> TIA

You need to reload your DataSet after you make changes and then bind again.
DataSet is disconnected.  It has no idea if you updated the database or not.

I prefer the programmatic approach myself.  So what you need to do is fill
your
DataSet after every change and then just bind your GridView.
GridView whenever you make  a

Reply via email to