Grid with more indexes
Moderator: Rathinagiri
Re: Grid with more indexes
I'm also having problems with grid.
I'll try to prepare sample.
Marek
I'll try to prepare sample.
Marek
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
Anyway... there is a rule that I've not documented yet.Roberto Lopez wrote: I've tested...
1. I open the first grid.
2. I go to record 26.
3. I double click it (the second grid window opens).
4. I close the second window (clicking [X]).
5. The record 26 looks exactly the same as prior to open the second grid.
The problem arises only when you press [Esc].
I must to find why this happens...
The idea is that if you change the grid environment, you must to do a refresh to get it work ok.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
Please, change your code, adding a refresh for grid at the end of test1() procedure as follows:Roberto Lopez wrote: Anyway... there is a rule that I've not documented yet.
The idea is that if you change the grid environment, you must to do a refresh to get it work ok.
Code: Select all
<...>
ACTIVATE WINDOW vnospredrac
select gl_pred
set order to indexg
predrac.Grid_pred.Refresh // <----- THIS!
return
I've changed the refresh method to keep the logical record selected.
- Attachments
-
- test3033e.rar
- (194.49 KiB) Downloaded 348 times
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
Anyway, I'll still working to determine the difference in behavior between closing the window with Escape and with the mouse.Roberto Lopez wrote: I've changed the refresh method to keep the logical record selected.
My idea is to reduce the situations when a programatic refresh is required.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
-
- Posts: 99
- Joined: Mon Nov 30, 2009 7:17 am
- Location: Slovenia
- Contact:
Re: Grid with more indexes
Now works perfectly also without refresh.
I just want to change all BROWSE with GRID and I have a lot ob BROWSE commands in my program. So in next weeks perhaps I will have another problems.
Hmm, the other solutions will be to upgrade BROWSE, but ... yes I know the story.
Best regards Rado
I just want to change all BROWSE with GRID and I have a lot ob BROWSE commands in my program. So in next weeks perhaps I will have another problems.
Hmm, the other solutions will be to upgrade BROWSE, but ... yes I know the story.
Best regards Rado
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
Browse took a lot of time to become stable and reliable at the beginning of MiniGUI library development.radohabjan wrote:Now works perfectly also without refresh.
I just want to change all BROWSE with GRID and I have a lot ob BROWSE commands in my program. So in next weeks perhaps I will have another problems.
Hmm, the other solutions will be to upgrade BROWSE, but ... yes I know the story.
Best regards Rado
Grid is fully new code and could take some time to get it working perfectly. This is the reason because 3.0.x is in test stage yet.
Maybe you should to wait until Grid become more reliable prior to leave Browse definitively.
Your reports are greatly valuable since you are pushing Grid to complex situations.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
The problem still arising is a specific situation.Roberto Lopez wrote: Your reports are greatly valuable since you are pushing Grid to complex situations.
The cause is that you change the record pointer of first grid rowsource area programatically on its own doubleclick procedure:
Code: Select all
select gl_pred
indexg=indexord()
go katerig
That is my problem, not yours . Grid should notice about external record pointer changes and correct it automatically to correctly redraw itself.
As I've said, the general rule is to do a refresh when you make change the Grid working environment, but I'm trying to reduce the number of situations when such thing is required, to make easier the life of the HMG programmer
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Grid with more indexes
HI Roberto,
BTW, I note that in the sample "test" of radohabjan, when you press left of right keys the gird flickers a lot, but if you go directly to the end of the grid pressing right key/arrow and you then you try to move pressing again left o right keys the grid doesn´t flicker until you pass the lockcolumn. Is there any way to lock the first real column (no the Column "Num" in this example I refer to the little column space that appear in any grid) maybe if it was possible it will avoid the nasty flickering)
Regards,
Ed
A proposito, me di cuenta que en el ejemplo "test" de radohabjan, cuan do se presionan las teclas derecha o izquierda el control grid parpadea mucho, pero if se va hasta la columna final del grid presionando la tecla/flecha derecha y entonces presionamos nuevamente las teclas/flechas derecha o izquierda el parpadeo desaparece mientras que no se pase de la columna Lockcolum, hay alguna forma de bloquear la primera columna real de grid (no la columna "Num" en este ejemplo, me refiero a la pequeña columna en balnco que aparece en todos los Grid) posiblemente si esto fuera posible esto evitaria el feo parpadeo.
Gracias,
Ed
BTW, I note that in the sample "test" of radohabjan, when you press left of right keys the gird flickers a lot, but if you go directly to the end of the grid pressing right key/arrow and you then you try to move pressing again left o right keys the grid doesn´t flicker until you pass the lockcolumn. Is there any way to lock the first real column (no the Column "Num" in this example I refer to the little column space that appear in any grid) maybe if it was possible it will avoid the nasty flickering)
Regards,
Ed
A proposito, me di cuenta que en el ejemplo "test" de radohabjan, cuan do se presionan las teclas derecha o izquierda el control grid parpadea mucho, pero if se va hasta la columna final del grid presionando la tecla/flecha derecha y entonces presionamos nuevamente las teclas/flechas derecha o izquierda el parpadeo desaparece mientras que no se pase de la columna Lockcolum, hay alguna forma de bloquear la primera columna real de grid (no la columna "Num" en este ejemplo, me refiero a la pequeña columna en balnco que aparece en todos los Grid) posiblemente si esto fuera posible esto evitaria el feo parpadeo.
Gracias,
Ed
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
This particular sample uses dynamicbackcolor, dynamicforecolor, and columns based on expressions for about 10 of a total of 20 columns.Steed wrote:HI Roberto,
BTW, I note that in the sample "test" of radohabjan, when you press left of right keys the gird flickers a lot, but if you go directly to the end of the grid pressing right key/arrow and you then you try to move pressing again left o right keys the grid doesn´t flicker until you pass the lockcolumn. Is there any way to lock the first real column (no the Column "Num" in this example I refer to the little column space that appear in any grid) maybe if it was possible it will avoid the nasty flickering)
Regards,
Ed
A proposito, me di cuenta que en el ejemplo "test" de radohabjan, cuan do se presionan las teclas derecha o izquierda el control grid parpadea mucho, pero if se va hasta la columna final del grid presionando la tecla/flecha derecha y entonces presionamos nuevamente las teclas/flechas derecha o izquierda el parpadeo desaparece mientras que no se pase de la columna Lockcolum, hay alguna forma de bloquear la primera columna real de grid (no la columna "Num" en este ejemplo, me refiero a la pequeña columna en balnco que aparece en todos los Grid) posiblemente si esto fuera posible esto evitaria el feo parpadeo.
Gracias,
Ed
The time needed to evaluate all of this for each cell, each time that the grid must be redrawn (ie with it is scrolled) causes the flickering.
I guess that Grid could eventually be optimized, but I'm working on make it stable and reliable right now.
Optimizations will come when all be working ok.
Moreover, much of the processing time will come from cell evaluations added by the user and is his responsibility too, to reduce it to a minimum to keep it fast.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid with more indexes
This exposes a situation that will require a new feature for Grid.Roberto Lopez wrote:<...>
The cause is that you change the record pointer of first grid rowsource area programatically on its own doubleclick procedure:
<...>
I'll try to explain in a very simple way (I'll repeat some concepts already discussed in previous posts).
1. Grid NEEDS to move the record pointer in its workarea (rowsource) to update cells content.
2. The updates are AUTOMATICALLY INITIATED by the operating system (when total or partial repaint of the control is required).
3. When the user programatically moves the record pointer in the Grid workarea, it could be wrongly repainted and since Grid will move it again according its needs when required, the user could not be sure about where the record pointer is at a specific time.
The bottom line is: When the user needs to control the record pointer in the Grid workarea, there will be a 'fight' for the record pointer control, that eventually could cause the grid update and the user's routine to fail.
I've not put attention to this situation earlier because, moving the record pointer in the Grid area is something that I've never think to do, but I understand that this could be 'reasonable' for people using other programming techniques.
After thinking a little, I've concluded that the only solution is to add two new methods for data-bound Grid: 'DisableUpdate' and 'EnableUpdate'.
Through this methods the user will be able to temporarily 'suspend' automatic grid updates, to safely manipulate the record pointer in its workarea(s) if required.
I'm testing this right now.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)