Subject Re: what's the missing link to this grid behavior
From Dirk <non@non.com>
Date Wed, 13 Apr 2022 20:52:40 +0200
Newsgroups dbase.getting-started
Attachment(s) filter_frid.pdf

Op 13/04/2022 om 18:25 schreef Ken Mayer:
> On 4/13/2022 8:59 AM, Dirk wrote:
>> Hello,
>>
>> when i Filter data, i only get the first row in the grid, by navigation
>> i can continou browsing when datalink grid = vraagbak_Firma.rowset
>>
>> when i change the datalink to vraagbak_bezoek i get all the dats of
>> the persons in the range , like  date >= 01/01/2015  and date <=
>> "15/01/2021
>>
>> using the query bezoek as parent en firma as child
>>
>> what i am missing here
>> thanks to put me on right way
>>
>> Dirk
>>
>> function knop_aanvang_onClick
>>     local dStart, dEinde, volgnr
>>      dStart= (form.keuzeveld_begin.value)
>>       dEinde=(form.keuzeveld_einde.value)
>>
>>       this.parent.vraagbak_bezoek.params["Start"] = dstart
>>        this.parent.vraagbak_bezoek.params["Einde"] = dEinde
>>    this.parent.vraagbak_bezoek.requery()
>>         this.parent.rooster_info.datalink =
>> this.parent.vraagbak_firma.rowset
>>
>>
>>    this.VRAAGBAK_BEZOEK = new QUERY(this)
>>     with (this.VRAAGBAK_BEZOEK)
>>        left = 210.0
>>        top = 187.0
>>        width = 92.0
>>        height = 37.0
>>        database = form.databank_klanten
>>        sql = "Select idnummer, visit, time1, time2  from visit where
>> visit >= :Start and visit <= :Einde order by visit"
>>        Requestlive = false
>>        params["Start"] = {}
>>        params["Einde"] = {}
>>        active = true
>>     endwith
>>
>>     with (this.VRAAGBAK_BEZOEK.rowset)
>>        onNavigate = class::ROWSET_ONNAVIGATE
>>        autoEdit = false
>>     endwith
>>
>>     this.VRAAGBAK_FIRMA = new QUERY(this)
>>     with (this.VRAAGBAK_FIRMA)
>>        left = 126.0
>>        top = 286.0
>>        width = 84.0
>>        height = 37.0
>>        database = form.databank_klanten
>>        sql = "select idnummer, name, plz, city, soort, outside from
>> stammdat where idnummer = :idnummer"
>>        requestLive = false
>>        params["idnummer"] = ""
>>        masterSource = form.vraagbak_bezoek.rowset
>>        active = true
>>     endwith
>>
>>     with (this.VRAAGBAK_FIRMA.rowset)
>>        with (fields["soort"])
>>           lookupSQL = "select segcode, description from segm"
>>        endwith
>>        with (fields["outside"])
>>           lookupSQL = "select  afkorting, name from employee order by
>> name"
>>        endwith
>>     endwith
>>
>
> try after setting your filter:
>
> form.rowset.refreshControls()
>
> You might want to also try checking to see how many rows are in your
> filter:
>
>     ? form.rowset.count()
>
> and in some cases, I have found that I might be actually at the last
> record, so:
>
> form.rowset.first()
>
> Ken
>
Ken,

following your advice

checked as follow: the same app but with Masterfields/rowset == 17 rows
grid schows all ok get the 17  rows

with master source get the 17  rows aswell

before refreshing and after refreshing

added 2 grid columms

vraagbak_bezoek :: idnummer ; i get 17 different idnumbers

vraagbak_firma :: idnummer  : i get 17 times the first idnummer

checked with past dates == 01/01/2015  and 05/01/2015

even with rowset.first, but using requery it goes directly to the first rows


annex pictures of Grid

thanks for some more advice

Dirk,