[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

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
0
Takamine334
Asked:
Takamine334
  • 4
  • 2
2 Solutions
 
SethiCommented:
Simply use .clear method of the flexgrid and add the number of rows that you want.
0
 
jpaulinoCommented:
You want to remove all ?
0
 
jpaulinoCommented:
As Sethi already post it .clear method.

Don't forget to use .Redraw = False before and .Redraw = True after.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
jpaulinoCommented:
Takamine334 you should split the point with Sethi!

:-)



0
 
jpaulinoCommented:
Good work.

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now