Link to home
Start Free TrialLog in
Avatar of Takamine334
Takamine334Flag for United States of America

asked on

How do you remove rows from an MSHFlexGrid?

by pressing a command button, how could you quickly remove 15 thousand rows from an MSHFlexGrid? The code I have now is quite slow:

        For j = 1 To FlexGrid.rows - 1
            If FlexGrid.Row <> 0 Then
                FlexGrid.RemoveItem FlexGrid.Row
                'J = J - 1
                FlexGrid.Row = FlexGrid.Row - 1 '1
                '+ 1 ' 1
            End If
        Next j
Avatar of Sethi
Sethi
Flag of India image

Simply use .clear method of the flexgrid and add the number of rows that you want.
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Takamine334 you should split the point with Sethi!

:-)



Good work.

Jorge
LOL..He has split the point amongst you :-))