Page 1 of 1

BROWSE - how to get FIELDS array, HEADERS array

Posted: Thu Apr 09, 2009 7:29 am
by mol
Hi guys!
Iwanna write an universal function to set filter working with any browse, called from context menu.
I tried to use something like that:
cCurrWindow:= thisWindow.name
cCurrBrowse := this.name
aFields := GetProperty(cCurrWindow, cCurrBrowse, "Fields")
but this sample doesn't work...
Where is error?
What do you think?

Best regards and Happy Easter
Marek

Re: BROWSE - how to get FIELDS array, HEADERS array

Posted: Thu Apr 09, 2009 8:41 am
by Rathinagiri
Try using this...

i := GetControlIndex ( cbrowsename , cwindowname )

aFields := _HMG_SYSDATA [ 31 ]
aHeaders := _HMG_SYSDATA [ 33 ]

This is an internal extraction from HMG Source h_browse.prg. I remember Roberto told this in gridprint thread.

Re: BROWSE - how to get FIELDS array, HEADERS array

Posted: Thu Apr 09, 2009 10:45 am
by mol
Thanks Rathi, it works!

Re: BROWSE - how to get FIELDS array, HEADERS array

Posted: Thu Apr 09, 2009 11:56 am
by Rathinagiri
Oh! Yes, I know that. :)