Results 1 to 8 of 8

Thread: [RESOLVED] MSFlexGrid Help - Different Values/Same Procedure

Threaded View

  1. #1

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Resolved [RESOLVED] MSFlexGrid Help - Different Values/Same Procedure

    I have an MSFlexGrid on my form that holds data. When the user hit's the refresh button I call the function to populate the grid, but before doing so I need to erase the current contents and rows from the grid.

    I can clear the data from the grid using the .CLEAR, but I can't get the rows to get lost. The end result is that my "refresh" button just adds 31 more rows to the flexgrid.

    Here's my code to clear the flexgrid - as it stands right now. It seems to work okay, but when it gets to row 16 I get an error saying that there is no such row in the flexgrid. That's weird considering the flexgrid has 31 rows!

    VB Code:
    1. Public Sub ClearFLexGrid()
    2. Dim intCount As Integer
    3.  
    4. MSFlexSummary.Clear
    5.   For intCount = 0 To MSFlexSummary.Rows - 1
    6.        MSFlexSummary.RemoveItem (intCount)
    7.   Next
    8. End Sub

    UPDATE - Sorry, my error is "Cannot perform an update on a fixed row"
    Last edited by The_Grudge; Oct 26th, 2006 at 09:55 AM.

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