>>>Hi all, im using the classic:
>>thisform.grid1.setall("DynamicBackColor", ;
>> "IIF(RECNO()%2 = 0,RGB(184,207,235), RGB(255,255,255))", "Column")
>>
>>but when end user changes order in table, it makes that rows with similar color be together, how can i fix this?
>>
>>thank you all.
>
>>If you use a view for your grid, it will still be the alternating colors. And that's assuming you recreate your view when you change the order.
>
>i'm using directly alias(), but if i got your point it means that use a view and recreate it every time that order had changed.
>
>thank you
Correct. The view, if you use an ORDER BY, will be in the correct order and the RECNO() will allow the alternating colors.
Another way if you don't want to use a view is to SQL-SELECT the RECNO()'s from your table into an array property and then you'd do an ASCAN() to find your recno and use the "%2=0" on the index into the array. Versions prior to VFP 9 this limits you to 65,000 records.