Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids
Message
From
09/12/2022 06:28:18
 
 
To
08/12/2022 13:46:24
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Re: Grids
Miscellaneous
Thread ID:
01685462
Message ID:
01685481
Views:
66
>>>Hi Folks,
>>>
>>>I'm lost. I have an app (GoFish) that sets a grid to a controlsource. This is as simple as
>>>
>>>loGrid.ColumnCount = Fcount(Thisform.cSearchResultsAlias)
>>>loGrid.RecordSource = (Thisform.cSearchResultsAlias)
>>>
>>>The grid itself has a number of columns at design time, oddly set columnorder, oddly set zorder. Some have a column order some not. The number is different to the one set above.
>>>
>>>The column Column17 appears left most and will be the first instantiated. It gets the 3th column of the table. Even when I change the table. It's all time the third.
>>>Why? Why the third?
>>>
>>
>>Because ColumnOrder is set to 3 for that column.
>>
>>Tamar
>
>ColumnOrder is determining the column of the cursor to pick? It's about visibly sorting the columns! There is not a single word in the help on this. And, since I never do this, because design time handling grids with dynamics odd at least I had never a chance to see this.
>I'm to old for this kind of feature.
>
>So how in relation of columnorder and zorder does this work? The grid has columns with and without ColumnOrder set, and ZOrder is special as well? How does it end up?

My understanding is that when the individual columns and/or controls in the columns don't have ControlSources set, the columns of the grid are assigned columns of the RecordSource in display order. BTW, ColumnOrder has weird behavior. Here's what we said about it in HackFox:

"When you change the order of one page or column, others may change as well. Oddly, the way they change differs. For pages, the new PageOrder must be between 1 and PageCount. (Actually, 0 is accepted, but it's treated just like 1.) The pages between the new position and the end all get pushed to the right.

"Columns are different. First, the property sheet has a unique way of rejecting values out of bounds. If you type a value that's not between 1 and ColumnCount, it's summarily rejected and replaced with the column's current ColumnOrder. At runtime, values out of range are simply ignored, as if you didn't even issue the command. When you change ColumnOrder to something acceptable, that column and the one that already had the specified ColumnOrder change places. That is, if you take the column with ColumnOrder=4 and change its ColumnOrder to 7, it becomes the seventh column (visually), and the column that was seventh moves to fourth. What this means is that it's a heckuva lot easier to rearrange the columns with your mouse than by manipulating ColumnOrder."


>And could you produce some meaningful English text about this behaviour for the VFPX help project? I put it there, but it would be nice to have it in English written. I set up an issue ....

Everything I know about grids (or, at least, what I knew then) is in HackFox.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform