Como está seleccionado por el CURSOR muestra los standares de WINDONS y no consigo modificarlo y que la celda tome el color de la condición aunque esté seleccionada. Os paso el código, es muy simple.
Hay alguna posibilidad de que se aplique la condición al registro seleccionado en el GRID.
Muchas gracias.
---> Y en inglés según el Dr. Google he dicho
Hello, I have a GRID that shows the records of a DBF and depending on the value that one of them has, it paints the result of said color cell. It works correctly .. LESS WHEN IS THE FIRST RECORD the one that has to change color.
As it is selected by the CURSOR it shows the standards of WINDONS and I can not modify it and the cell takes the color of the condition even if it is selected. I pass the code to you, it's very simple.
There is some possibility that the condition applies to the record selected in the GRID.
Thank you very much.
Code: Select all
fColor := { || if ( This.CellValue = 1 ,"",IF(This.CellValue = 2,GREEN,IF(This.CellValue = 3,YELLOW,RED ))) }
@ 140,430 GRID grid_2 ;
WIDTH 300 ;
HEIGHT 300 ;
HEADERS { "F.Servicio", "Cantidad","Estado" } ;
WIDTHS { 100 , 100 ,100 } ;
ROWSOURCE "LPEDIDOS" ;
COLUMNFIELDS { "Fecha_Se" , "Cantidad" , "ESTADO"} ;
DYNAMICFORECOLOR { , ,fColor } ;
ON DBLCLICK Actual_Grid_2(aField, .F., @lNuevo, aTipos) ;
DYNAMICDISPLAY {bdDisplay_1 ,bdDisplay_1 , bdDisplay_3 }