USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Colorir um campo da FlexGrid
Juliana T.
SÃO PAULO
SP - BRASIL
ENUNCIADA !
Postada em 18/08/2008 16:33 hs         
Pessoal, por favor, me ajudem! Já tentei de mtas maneiras, mas não estou conseguindo!
Seguinte!! Eu estou puxando do banco de dados algumas informações, mais ou menos assim:
 
.AddItem ""
                    flexgrid.TextMatrix(.Rows - 1, 0) = rs(9)
                    flexgrid.TextMatrix(.Rows - 1, 1) = rs(0)
                    flexgrid.TextMatrix(.Rows - 1, 2) = rs(10)
                    flexgrid.TextMatrix(.Rows - 1, 3) = rs(49)
                    flexgrid.TextMatrix(.Rows - 1, 4) = rs(50)
                    flexgrid.TextMatrix(.Rows - 1, 5) = rs(44)
                    flexgrid.TextMatrix(.Rows - 1, 6) = rs(1)
                    flexgrid.TextMatrix(.Rows - 1, 7) = rs(2)
                    flexgrid.TextMatrix(.Rows - 1, 8) = rs(3)
                    flexgrid.TextMatrix(.Rows - 1, 9) = rs(4)
                    flexgrid.TextMatrix(.Rows - 1, 10) = rs(5)
                    flexgrid.TextMatrix(.Rows - 1, 11) = rs(6)
                    flexgrid.TextMatrix(.Rows - 1, 12) = rs(7)
                    flexgrid.TextMatrix(.Rows - 1, 13) = rs(8)
                    rs.MoveNext
 
Eu preciso colorir a linha da coluna 12(rs7) usando essa fórmula
a= rs(1) - rs(2)
If a< rs(7) then
flexgrid.TextMatrix(.Rows - 1, 12) = rs(7) = .forecolor = vbred
end if
Mas não vai de jeito nenhum...Alguem saberia me explicar como eu posso fazer???
POR FAVOR!!!
   
Treze
Pontos: 2843 Pontos: 2843
SÃO VICENTE
SP - BRASIL
ENUNCIADA !
Postada em 18/08/2008 18:29 hs            
Tenta assim Juliana
veja
 
.AddItem ""
                    flexgrid.TextMatrix(.Rows - 1, 0) = rs(9)
                    flexgrid.TextMatrix(.Rows - 1, 1) = rs(0)
                    flexgrid.TextMatrix(.Rows - 1, 2) = rs(10)
                    flexgrid.TextMatrix(.Rows - 1, 3) = rs(49)
                    flexgrid.TextMatrix(.Rows - 1, 4) = rs(50)
                    flexgrid.TextMatrix(.Rows - 1, 5) = rs(44)
                    flexgrid.TextMatrix(.Rows - 1, 6) = rs(1)
                    flexgrid.TextMatrix(.Rows - 1, 7) = rs(2)
                    flexgrid.TextMatrix(.Rows - 1, 8) = rs(3)
                    flexgrid.TextMatrix(.Rows - 1, 9) = rs(4)
                    flexgrid.TextMatrix(.Rows - 1, 10) = rs(5)
                    flexgrid.TextMatrix(.Rows - 1, 11) = rs(6)
                    flexgrid.TextMatrix(.Rows - 1, 12) = rs(7)
                    flexgrid.TextMatrix(.Rows - 1, 13) = rs(8)
a= rs(1) - rs(2)
If a< rs(7) then
For i = flexgrid.FixedCols To flexgrid.Cols - 1
    flexgrid.Col = 12
    flexgrid.CellBackColor = &HFF&       ' cor alterada
Next i
end if
rs.MoveNext
 
   
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2024   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página