CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2000
    Posts
    7

    Set color to datagrid row

    How can I set foreground color to a row in a datagrid? I need to set colors to certain rows when a condition is met.

    Thanks in advance for your help.


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Set color to datagrid row

    That is how you can change color in msflexgrid

    Private Sub MSFlexGrid1_Entercell()
    MSFlexGrid1.CellBackColor = vbRed
    End Sub
    Private Sub MSFlexGrid1_Leavecell()
    MSFlexGrid1.CellBackColor = vbwhite
    End Sub


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Oct 2000
    Posts
    7

    Re: Set color to datagrid row

    Thanks Iouri,

    How about for a datagrid type grid?

    Thanks again.


  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Set color to datagrid row

    I did not try. Check if DBGrid has such properies.

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured