SEEK with SOFTSEEK clause
moves the pointer in the database
to the last record displayed in the grid,
see the program and the picture below.
Grid & SoftSeek
Moderator: Rathinagiri
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Grid & SoftSeek
- Attachments
-
- grid_test.PNG (16.28 KiB) Viewed 5212 times
-
- grid_test.zip
- (2.51 KiB) Downloaded 311 times
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid & SoftSeek
Maybe I'm missing something, but it works just as it should for me.Czarny_Pijar wrote:SEEK with SOFTSEEK clause
moves the pointer in the database
to the last record displayed in the grid,
see the program and the picture below.
Grid moves the record pointer in its workarea.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: Grid & SoftSeek
Let's start again in the different way.
Now in the demo we have 2 child forms, first with the grid, second without the grid, both performing SOFTSEEK.
I expect in both forms the results of SOFTSEEK to be the same, but the grid is responsible for the differences.
The modified demo attached below.
==========================
BTW, another minor bug in the IDE occurs. How to get:
1 Run IDE
2 Open any project
3 Click 'New Project' in the IDE
4 Click 'Cancel' in the resulting dialog box
5 Click 'New Form' in the IDE
Looks like the option 'New Project' forced to close the current project, no mercy.
Now in the demo we have 2 child forms, first with the grid, second without the grid, both performing SOFTSEEK.
I expect in both forms the results of SOFTSEEK to be the same, but the grid is responsible for the differences.
The modified demo attached below.
==========================
BTW, another minor bug in the IDE occurs. How to get:
1 Run IDE
2 Open any project
3 Click 'New Project' in the IDE
4 Click 'Cancel' in the resulting dialog box
5 Click 'New Form' in the IDE
Looks like the option 'New Project' forced to close the current project, no mercy.
- Attachments
-
- hmg_ide_bug.PNG (6.88 KiB) Viewed 5187 times
-
- grid_test.zip
- (4.23 KiB) Downloaded 312 times
-
- grid_test.PNG (25.44 KiB) Viewed 5187 times
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Grid & SoftSeek
Each time that the operating system needs to repaint a specific region of a grid, it sends a message that is processed by HMG.Czarny_Pijar wrote:Let's start again in the different way.
Now in the demo we have 2 child forms, first with the grid, second without the grid, both performing SOFTSEEK.
I expect in both forms the results of SOFTSEEK to be the same, but the grid is responsible for the differences.
According to the logical row of the cell that needs be repainted, HMG moves the record pointer to such row to pick the required value to update the cell.
This process in initiated automatically by the operating system according its own needs, so, there is no way to modify this process.
Of course, HMG could backup the record position, move it to do the update and the restore it to its original position, but, such process could slow down grid a lot.
The bottom line is that there is no way to predict where the record pointer is at a specific moment, because it is moved according to the region of the window that the operating system needs to repaint in a specific situation.
This is the reason because I've added the 'recno' property. Via this property you can know the record number of the selected row, in the case that you need it to do something with it.
If you don't like this way, you could still using browse control and setting browsesync to 'on'.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: Grid & SoftSeek
I was close to give up the grid in favour of browse, but...Roberto Lopez wrote:If you don't like this way, you could still using browse control and setting browsesync to 'on'.
I've finally spotted the quirk:
I have to move the command 'grid.value' to the bottom, in order do NOT interfere with the data related to the current pointer of the database.
BTW, the other HMG-apprentices, beware: grid.value and grid.OnChange are not what they seems to be, at least for me
Re: Grid & SoftSeek
I've gave up with grid in few situations.
Browse looks to work properly in every situation.
I'll use it when grid becomes fully stable.
Regards, Marek
PS. Of course, I'll still test it
Browse looks to work properly in every situation.
I'll use it when grid becomes fully stable.
Regards, Marek
PS. Of course, I'll still test it
Re: Grid & SoftSeek
I'm building my own billing system.
I've wanted to use grid to display classical 1 to n relation: a bill and its content.
Two grids: first with headers of bills, second - with content of bills.
Everything looks OK when bill has more than 1 position.
When the bill has only one position, grid of content doesn't refresh...
What's going on?
I've missed something?
I'll prepare a little sample tomorrow.
Best regards, Marek
I've wanted to use grid to display classical 1 to n relation: a bill and its content.
Two grids: first with headers of bills, second - with content of bills.
Everything looks OK when bill has more than 1 position.
When the bill has only one position, grid of content doesn't refresh...
What's going on?
I've missed something?
I'll prepare a little sample tomorrow.
Best regards, Marek