Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on a method
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00291108
Message ID:
00291110
Views:
27
>Hi All,
>
>I have a routine that based on a condition changing the
>color grid's row.
>
>If I have 4 conditions thus , in 20 rows I may have colors scattered all
>over. I would like to create an index so all will shown together.
>
>I wonder if it is possible to index on this routine somehow.
>I created a fields called status and index on so Red is 1 yellow
>is 2, but it requires too much of a maintenance, and may be there is
>another way.
>
>The following is a sample condition code, that is fired via the
>DynamicBackColor property of the grid:
>
>
>DO CASE
> CASE PctDist.lPct_Cancelled
> *** Blue
> *** If Cancelled=
> RETURN RGB(0,255,255)
> CASE dSystemDate> ***Yellow
> *** For future LDI
> RETURN RGB(255,255,0)
>ENSCASE

You can index on UDF() (and UDF could be a method). The problem is that you may get severe maintenance problem if you create it on permanent basis. But if you base your grid on a cursor, then you can index it this way, right after it's created.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform