Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to freeze a grid column ?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00452047
Message ID:
00452126
Views:
28
Hi, guys!

You can do this programmatically, as I already described in one of threads here. The idea is following:

Grid have LeftColumn property that indicates which column in visible part of grid is currently leftmost. Note that leftmost column in visible part shown always completely (unless it is larger than grid width). You can replace this column by some other, (fixed) column, using column.ColumnOrder property. However, you should do this each time grid scrolled horizontally. This means you should do this not only in Scrolled event of grid, but in many other events that fired after grid scrolls self horizontally. For example, this occurs when you resize columns or move columns at right edge of grid, or you click header of column that partially displayed at right edge of grid, or just set focus to grid and focused column in grid is not in visible part. Post of such automatic scrollings does not fire Scrolled event, so you need to catch these in other events of controls, headers or grid.

I may try to dig our grid class and list here all places where scroll catching is needed, but this requires time, indeed.

HTH.

>>Can any one tell me how to freeze one or more columns
>>on the left side in a grid table ?
>

>You cannot really freeze a column, but what you can do is split up the grid into two parts.
>If you do not want the user to change that you can have transparant labels over it.
>You now only have to implement some code to prevent the user from going into the first column of the second part of the grid.
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