Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can a Grid be split ?
Message
From
02/09/2008 02:58:09
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01344016
Message ID:
01344018
Views:
15
>Hi.
>I have a Grid which I am using in an App but want to pack as many rows on the screen as possible.
>A split grid (i.e a Left and a Right grid showing the same columns ) would be handy if this could be done
>This would mean that for instance instead of displaying say 30 rows , I could display 60 rows
>(There are only about 8 columns required)
>
>Anybody know if this can be done or any alternatives ?
>The grid is being used for data entry.

If I understand correctly, the Grid.Partition property won't give you what you want, you want to display more rows, rather than fixing some of the columns of (say) 30 rows.

I assume you've already looked at and rejected pagination of a single grid - similar in concept to those date pickers that show a month in a grid, with left/right arrows that let you move to the prior or next month or year.

Or, for that matter, a simple vertical scrollbar - it would make your life a lot easier :) It's possible to code it so the "current" row where data are being entered is always properly/fully displayed at the bottom, with as many earlier rows as possible visible above.

Another thought depends on why you want to view so many rows. If it's because you want to view recently completed entries, are you currently using a FIFO stack, so the current entry is always at the bottom, and you can always see the most recent 29 completed entries? That avoids issues of not seeing *any* prior records if/when the grid pages/"jumps". Of course, if you are already using a stack maybe you want to see more recent entries and that's why you're asking ;) This is actually similar in concept to just setting a vertical scrollbar, but without actually including one.

Assuming you still want to go ahead, I can see two options:

1. One grid, driven by one cursor with 16 columns: Col1a, Col2a, ..., Col8a, Col1b, Col2b, ..., Col8b. The "a"s would hold rows 1 - 30, the "b"s rows 31 - 60.

2. Two grids driven by two separate cursors, each 8 columns wide.

In either case, if you're using them for data entry, especially in a multiuser environment, the code to keep the rows synchronized could get "interesting", depending on how you sort the rows, if rows are added/deleted/modified by others etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform