Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Freeze Panes' in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00619362
Message ID:
00619372
Views:
25
Hi!

See my comments below...

>I am trying to develop a form with a grid on it. This will scroll in two directions, and all the rows and columns will be derived from data. The topmost, leftmost, bottommost and rightmost columns/rows need to be frozen as they contain summary, label, title and total data. A 'mock-up' screen shot is available at:
>http://www.c3x.co.uk/materials.gif
>

Hmm...

>The commodity pack ( left most column ) would have more rows than can be displayed and this is defined by the data, so as you scroll through the rows all the rows would have to change in each area except for the summaries for the house type at the top and sub totals and totals at the bottom.
>
>The house type across the top is also variable defined by data, and you can scroll across the columns to see the data for each house type. I have the concession that I may lump house types and garages together so that the garage column are part of the same grid as the houses as the last entry. But the commodity pack labels must not scroll on the left and the totals on the right must always stay visible.
>
>So I would like to create a grid, or possibly several grids, or possibly use a control that someone else has written. I am wondering if anyone has experience on this they would like to contribute before I start work.
>
>My deliberations so far are:
>
>1) If it is one grid is there any way to freeze rows or columns?
>

No. For Columns it is possible, but houw you would make gaps between columns like in the picture? For rows it is not possible by reliable way, though I know some trick but better do not dive into these complexities.

>2) If it were several grids is it possible to make scrolling one cause another to scroll, reliably(!)?
>

I'm not sure, but for me seems reliable scrolling is possible. I know how to scroll to any row at the top of the grid visible area, but I do not know how reliable it is. This took for me quite a bit of work and experimenting. I was needed this thing for a single grid to scroll grid properly when created my MoverBar control for grids (like a MoverBars in the list box, but for grid). When MoverBar dragged by mouse out of grid bounds, grid is auto-scrolled. During that I was needed to scroll it programmatically by several ways, include to the specified row in the data. In addition, there were problems with first row weirdness in grid. I also on the way solved the problem with quick multiple refreshes of grid even when there are Dynamic* property expressions. It was needed to call Refresh of the grid multiple times with locked screen, that worked very slow till I found the solution.

If you really need this, I will try to experiment and create a sample with 2 grids and a code for synchronized scrolling. I do not guarantee that thiw will have success, but this thing was asked by many developers in the past, so it is interesting for me to investigate this finally.

>3) Has anyone used or made a nice easy to use control that does approximately the same thing?
>

Not sure you will find such thing. This is quite complex thing and I doubt its source code will ever go out of the very narrow group of persons, or these persons will share the code and approaches for free or for cheap.

>4) What about doing all this in Excel and then just viewing that from the FoxPro form.
>

You will require to learn a lot, and also require to find a way to handle Excel events in VFP. There are certain problems with Excel displayed in VFP form. For example, to get a complete and relable interaction with VFP form you will require to use WEB Browser control, in which you display Excel file instead of HTML page.

BTW, you can create your own grid. If using VFP grids become too complex because several issues, it is possible to create scroll bars using VFP pure controls. Then it is possible to draw something like a grid using native VFP controls. Not that hard as it looks: A lo of code, but all things well-controlled and reliable. When trying to find a solutions with grids - a lot of time spent for experimenting and workarounds, when little of code written. Just think about this approach too.


>This is being developed in VFP6.0, I have been told emphatically that 7.0 is not an option.
>

Its pity, because VFP7.0 with SP1 is quite reliable, and also have much more things, some of which are for grids as well. Though it is possible in VFP6.

>Thanks in advance for your help, advice and shared experiences.
>
>Bye4now,
>
>John.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform