Subject Re: Data refresh in a grid
From Mervyn Bick <invalid@invalid.invalid>
Date Tue, 1 Feb 2022 10:25:03 +0200
Newsgroups dbase.getting-started

On 2022/01/31 20:39, Ken Mayer wrote:

>> In form2 in the datetimepicker's onChange event handler
>>
>>      this.parent.parent.queryname.requery()
>
> You may not even need a requery, but instead:
>
> this.parent.parent.queryname.rowset.refreshControls()

There's often more than one way to solve a problem.

Looking at it again in the light of a new day and after a night's sleep
there's probably a need to save the new value first.  I also can't
remember why I used this.parent.parent.  It's not wrong but it's
definitely not required in this case.  And if the rowset has been
assigned to the form's rowset property in each form there isn't even the
need to specify the query name.

     form.rowset.save()
     form.parent.rowset.refreshControls()

Mervyn.