Discussion:
How to refresh data after dataset edit
(too old to reply)
pcerdaz
2006-11-02 16:13:43 UTC
Permalink
Hello,

Someone could help me about why data showed through a grid is
not actualized after it were changed on the dataset?
I tried using Refresh() over a Dataset and Repaint() over a
Grid but it doesn't work.
Only when I do a mouse click over the refresh icon on the navigator the data is actualized as expected to.

Thanks,
pcerdaz
Jayme Jeffman
2006-11-03 00:25:06 UTC
Permalink
Hello,

What kind of Dataset are you using ? TQuery ? TTable ? Other ?

Jayme.
Post by pcerdaz
Hello,
Someone could help me about why data showed through a grid is
not actualized after it were changed on the dataset?
I tried using Refresh() over a Dataset and Repaint() over a
Grid but it doesn't work.
Only when I do a mouse click over the refresh icon on the navigator the
data is actualized as expected to.
Thanks,
pcerdaz
pcerdaz
2006-11-02 23:53:39 UTC
Permalink
I'm using TTable. Something like this:
...
DMTEC->TablePagos->Edit();
DMTEC->TablePagos->FieldByName("Estado")->AsBoolean = True;
DMTEC->TablePagos->Post();
DMTEC->TablePagos->Refresh();
...
But the Grid that show registers from TablePagos doesn't
change "Estado" until I do a click over navigators refresh
icon.

Regards,
pcerdaz
Post by pcerdaz
Hello,
What kind of Dataset are you using ? TQuery ? TTable ? Other ?
Jayme.
Post by pcerdaz
Hello,
Someone could help me about why data showed through a grid is
not actualized after it were changed on the dataset?
I tried using Refresh() over a Dataset and Repaint() over a
Grid but it doesn't work.
Only when I do a mouse click over the refresh icon on the navigator the
data is actualized as expected to.
Thanks,
pcerdaz
Jayme Jeffman
2006-11-03 17:08:41 UTC
Permalink
Hello,

Make sure the Grid->DataSource-DataSet is "TablePagos" . Otherwise you
should perform a click on the Navigator Refresh button. Remember that, as
far as I know, there is no any database that fires an event telling that it
was updated to the the plugged Datasets. Did you understand ?

HTH

Regards.

Jayme.
Post by pcerdaz
...
DMTEC->TablePagos->Edit();
DMTEC->TablePagos->FieldByName("Estado")->AsBoolean = True;
DMTEC->TablePagos->Post();
DMTEC->TablePagos->Refresh();
...
But the Grid that show registers from TablePagos doesn't
change "Estado" until I do a click over navigators refresh
icon.
Regards,
pcerdaz
Loading...