How to clear MSFlexGrid data (Completely)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muddasirmunir
    Contributor
    • Jan 2007
    • 284

    How to clear MSFlexGrid data (Completely)

    I am using MSFlexGrid , I am using the follwing code to clear the data on click of button

    Code:
    grid1.Clear
    grid1.Row = 0
    grid1.Col = 0
    But, that only clear the data and still showing the entire fields there , let say before clearing the data I am displying 10 Record, the Grids of 10 Recored still visible but the data is vanished.

    I also want the rows and columsn to be vanished.

    How to achieve thei.
  • Guido Geurs
    Recognized Expert Contributor
    • Oct 2009
    • 767

    #2
    This clear a MSflexgrid:

    Code:
    With MSHFlexGrid1
       .Clear
       .Rows = 0
    End With

    Comment

    • muddasirmunir
      Contributor
      • Jan 2007
      • 284

      #3
      This code does Not works

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Try This :

        Grid1.Clear
        Grid1.Rows= 1
        Grid1.Cols = 1

        I'am assuming, Grid Is not Bound with a data source..
        If Bound, then Clear the dataSource/RecSet..


        Regards
        Veena

        Comment

        Working...