Results 1 to 3 of 3

Thread: [RESOLVED] MsFlexGrid Problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2007
    Posts
    18

    Resolved [RESOLVED] MsFlexGrid Problem

    Is it a known issue that after clearing a MSFlexGrid control using the .Clear method, formatting does not display properly?

    I populate the grid using the following method:

    Code:
       msFlxGrd.AddItem (sRecord & vbTab & CStr(sValue))
       
       If bHeader Then
            'This is a header, change the background colour.
            msFlxGrd.Redraw = False
            msFlxGrd.MergeCells = flexMergeRestrictRows
            
            msFlxGrd.row = msFlxGrd.Rows - 1
            msFlxGrd.MergeRow(msFlxGrd.Rows - 1) = True
            msFlxGrd.CellBackColor = &HDBD8D7
            msFlxGrd.CellFontBold = True
            msFlxGrd.Redraw = True
          ' msFlxGrd.TopRow = msFlxGrd.Rows - 1
        end if
    Once I call the clear method, and call the same code as above, it inserts the data fine, but the formatting does not take effect, (cellfontbold, cellbackcolor).
    Any ideas?

    Here is my clear method:

    Code:
       msFlxGrd.Redraw = False
       msFlxGrd.clear
       msFlxGrd.Rows = 0
       msFlxGrd.Redraw = True
       msFlxGrd.Refresh
    Ive been playing around with the refresh/redraw, but it makes not difference.

    Thanks,
    Luke

  2. #2

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2007
    Posts
    18

    Re: MsFlexGrid Problem

    That seems to have solved it, thank you very much sir.

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