GRID vs. BROWSE - which control is faster?

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

GRID vs. BROWSE - which control is faster?

Post by Pablo César »

I am still in doubt for choosing: Grid or Browse. For me in Clipper was very usefull to use TBrowse for arrays specially when I need to change all records with its contents.
For example:

Browse1 showing dbf records and Browse2 showing their sons records and when changing records from Browse1 besides show their other records. In other words: List of clients with their buying orders.

Examples which I have seem it was dbf-records with dbf-records and I will need array-records. Because I believe arrays manipulation is faster that fisical in dbf, specially when I have to use SET FILTER or UNIQUE.

I will see VirtualGrid that Mr. Rathinagiri advised, but I am not sure how to compose arrays extracted from dbf in Virtual Grid.
Rathinagiri wrote:
bpd2000 wrote:Any example / sample program using IMHO virtual grid
Please see HMG main folder/samples/grid.01 to grid.38 demo folders
I have seem for virtual grid samples are from folder/samples/grid.02 to folder/samples/grid.24 not upto 38 or 39... others upper 24 are not virtual are from rowsource (from dbf).

I tested normal Grid crating arrays according dbf records I show fine. But there is an combobos option that change filter and I can not remake the existing array for re-showing. I am lost at moment, I do not know what to use: backing to Browsing with dbf-records or Grid/VirtualGrid with array remaking all the time when change filter. But this last option I do not found the right way.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

GRID vs. BROWSE - which control is faster?

Post by Pablo César »

I have found this in \Grid FastFind\now.prg by Honorio and modified by Jacek Kubica:

DELETE ITEM ALL FROM Grid_1 OF Win_1

But I am still do not found a way to remake the array.
Marek wrote:I have no time to analyze h_grid.prg source file.
I do not promise to find control faster or not. But I will look deep in h_grid.prg and find myself the solution for my case. It is incridible as important to find from the deep soul of question having the source code ! Thank you Roberto for your great idea to share with allof us ! God and all programmers bless you !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: GRID vs. BROWSE - which control is faster?

Post by mol »

I'm still using Browse. It works quite good to me and causes no problems with filters, changing indexes etc.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

GRID vs. BROWSE - which control is faster?

Post by Pablo César »

I have found the only example working Grids with arrays in HMG\SAMPLES\AGENDA from Humberto Fornazier which teach us how to use some "Grid" commands like these:

MODIFY CONTROL
ADD ITEM
DELETE ITEM

Analysing his example Agenda.prg I note that I can easy work with arrays in Grid. Was wonderful work of Mr. Humberto, now I feel much better even knowing that I was inexperienced with Grids strenght. My ignorance make me feel so "plastered" in what I tried to do. I am enjoying much this HMG... thanks again HMG team !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

Re: GRID vs. BROWSE - which control is faster?

Post by nguyenchiduc »

mol wrote:I'm still using Browse. It works quite good to me and causes no problems with filters, changing indexes etc.
I still use the gird with a file ".Dbf" intermediate (temp) to display the results.

The number of records on the server from hundreds of thousands to millions.

This is not optimal but still ok
fugazi
Posts: 23
Joined: Thu Jun 16, 2011 10:58 am

Re: GRID vs. BROWSE - which control is faster?

Post by fugazi »

mol wrote:I'm using function, which realises incremental searching of data entered in "Wyszukaj" Field.
Any input in "Wyszukaj" field causes DBSeek in table and changes pointer in table.
No filter is set.
When I present data in BROWSE control, everything works ok:
Image

Cześć
Miałem ten sam problem. Ustaw Multiselect na .F. > Set, Get Grid.Recno wtedy mi działa poprawnie.

Pozdrawiam
Fugazi

When I present data in GRID control, it's very strange, but table shows different records than searched:
Image

for changing pointer in GRID/BROWSE I use this code:

Code: Select all

               if lGridControlMode
			SetProperty(cOkno,"B_Towary","RECNO", towary->(Recno()))
		else  
                        //lBrowseControlMode
			SetProperty(cOkno,"B_Towary","Value", towary->(Recno()))
		endif

What's wrong with me or GRID???
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: GRID vs. BROWSE - which control is faster?

Post by mol »

Hej,
chyba napisałeś odpowiedź w środku mojego posta :lol:
Jak możesz, popraw, będzie łatwiej zrozumieć tekst.
Choć podejrzewam, że i tam mało Polaków nas czyta.
Ale niech tam, niektórzy z uporem maniaka piszą po hiszpańsku, więc niech choć trochę połamią głowę nad tym tekstem :lol:
Pozdrowienia, Marek
fugazi
Posts: 23
Joined: Thu Jun 16, 2011 10:58 am

Re: GRID vs. BROWSE - which control is faster?

Post by fugazi »

Hej,

Męczyłem grida parę dni, szukałem wyjaśnienia na forum dlaczego grid.recno nie zwraca i nie daje się poprawnie podstawić. Mam ustawione relacje
a w columnfields wyspecyfikowane pola z wielu selectów
{'decyzje->typ_fak+" "+decyzje->typ_obiekt+decyzje->rodzaj+decyzje->stan','decyzje->indeks','ALLTRIM(ludzied->nazwisko)+" "+ALLTRIM(ludzied->imie)','left(zasobyd->nazwa,40)'}

Jak wyłączyłem property multiselect grid.recno działa poprawnie. Zastanawiam się do czego służy multiselect i czemu nie działa grid.recno?

Pozdrawiam
Fugazi

P.S. W nowych postach będę po angielsku ale w odgrzewanych niech się pomęczą :-)
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: GRID vs. BROWSE - which control is faster?

Post by mol »

Myślałem, że browse spowalnia pracę programu a nie mogłem dojść końca z gridem. Miałem mało czasu, więc zostawiłem browsa. Okazało się, że przyczyna wolnej pracy leżała zupełnie gdzie indziej.
Męczyłem później grida do pracy z tabelami, dość dużymi. Bardzo dobrze działa jako virtualgrid. Rewelacyjnie szybko.
Ale z moich obserwacji wynik, że zakażdym razem grid jest odświeżany dwa razy - zupełnie nie wiem po co, pewnie jakiś wyjątek wyzwala drugie odświeżanie.
Marek
bartsoft
Posts: 3
Joined: Mon Feb 13, 2012 2:41 pm

Re: GRID vs. BROWSE - which control is faster?

Post by bartsoft »

Dołącze się do dyskusji - MultiSelect to wybór z możliwością zanaczania kilku wierszy (zwraca wtedy tablicę z rekordami)...
Post Reply