Results 1 to 2 of 2

Thread: MSHflexgrid row color.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Question MSHflexgrid row color.

    Hi All!
    I want a way by which i can color my entire row with only one command.
    My problem is, i am displaying my flexgrid like an excel file.
    ANd depending upon different crieteria, i want to color each row with some color.
    I am using this code right now to color but it really takes time to color.
    So is there any other way for the same ?
    Code:
    'j is my current row
    For X = 0 To mygrid1.cols - 1
                  .col = X
                  .row = j
               mygrid.CellBackColor = cc
    Next
    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: MSHflexgrid row color.

    Can you try something like this?
    Code:
    With MSHFlexGrid1
        .Redraw = False
        ' set grid's style
        .AllowBigSelection = True
        .FillStyle = flexFillRepeat
        ' grey every other row
        .row = j
        .col = .FixedCols
        .ColSel = .Cols() - .FixedCols - 1
        .CellBackColor = cc
        .AllowBigSelection = False
        .FillStyle = flexFillSingle
        .Redraw = True
    End With
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

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