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:
Public Sub ClearFLexGrid() Dim intCount As Integer MSFlexSummary.Clear For intCount = 0 To MSFlexSummary.Rows - 1 MSFlexSummary.RemoveItem (intCount) Next End Sub
UPDATE - Sorry, my error is "Cannot perform an update on a fixed row"




Reply With Quote