Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to freeze a grid column ?
Message
From
22/12/2000 11:36:23
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00452047
Message ID:
00456341
Views:
27
A much simpler way to do it that we use is to RETURN .F. in each column's textbox, except the freezed one, of course.

If you found yourself doing this frequently, you can instrument your textbox base class' WHEN to do it automatically when the textbox is in a column's grid and some grid property is ON. You can defreeze the columns you need either by having a property playing around or by breaking inheritance (that depends in how lazy you'are) 8-)

Hope this helps.


>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform