[RESOLVED] MSFlexGrid - Clearing the RowData / ColData
Quick Question,
When using MSFlexGrid (Microsoft FlexGrid Control 6.0) I have noticed that when you run the Clear function to remove all the data from the Flexgrid the RowData and ColData values stay!
Now, I get around this by setting the Rows property to 0, but do we know if there is a function somewhere in there which will delete ALL data including whats in the RowData and ColData indexes?
Re: MSFlexGrid - Clearing the RowData / ColData
Resetting Rows/Cols to zero resets all values. If you want to manually do that then you'd have to loop:
Code:
With MSFlexGrid1
.Clear
For i = 0 To .Rows - 1
.RowData(i) = 0
Next i
For i = 0 To .Cols - 1
.ColData(i) = 0
Next i
End With
Re: MSFlexGrid - Clearing the RowData / ColData
Thanks Rhino. I probably stick with resetting the Rows/Cols.
You'd think that the clear function would clear them out thou!
Maybe its a bug in the control?
Re: MSFlexGrid - Clearing the RowData / ColData
There are a few gotchas with the grid controls but once you know what they are, you can deal with them pretty easily.
I've always prefered the ListView to any of the grids, but that control has its own idiosyncrasies.