Problems to refresh binding with a dataset handle

Posted by Kai Siegele on 15-Aug-2017 04:26

Hallo,

I want to show the content of a dataset handle in a data grid view.

For that purpose

* I have created a new ABL form-class.

* I have added a data grid view to the form.

* I have added a (Progress.Data.)BindingSource to the form.

* I have filled the dataset.

* I have added the dataset handle to the binding source using constructor.

When opening the dialog everything is OK.

Now I want to refill the dataset using another condition. So

* I have filled the dataset again.

* I have invoked the Refresh method of the binding.

Unfortunately nothing happened. When moving the vertical scrollbar of the data grid view suddenly all cells become empty. Has anyone an idea why?

Kind regards

Kai Siegele

Posted by Laura Stern on 15-Aug-2017 07:02

You have to reopen all the queries.  Reopen the TOP-NAV-QUERY of the DataSet.  The child queries will resync automatically if the DataSet is set up to do that.  I forget the attribute, but it might be the default.

The binding is all based on the query result set, not just the contents of the tables.

All Replies

Posted by Laura Stern on 15-Aug-2017 07:02

You have to reopen all the queries.  Reopen the TOP-NAV-QUERY of the DataSet.  The child queries will resync automatically if the DataSet is set up to do that.  I forget the attribute, but it might be the default.

The binding is all based on the query result set, not just the contents of the tables.

Posted by Kai Siegele on 15-Aug-2017 09:40

Hallo Laura,

thank you for your reply.After inserting

hDataset:TOP-NAV-QUERY:QUERY-OPEN ().

the program works.

Kind regards

Kai Siegele

Posted by Laura Stern on 15-Aug-2017 09:44

Great.  Glad it is working.

I am going to check the documentation to see if this is in there.  It should be, in big bold letters, all over the place!!  I probably answer this question about once a month!

This thread is closed