Results 1 to 4 of 4

Thread: [RESOLVED] MSFlexGrid - Clearing the RowData / ColData

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2008
    Location
    Merseyside
    Posts
    456

    Resolved [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?
    Last edited by kevchadders; Mar 10th, 2008 at 10:42 AM.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2008
    Location
    Merseyside
    Posts
    456

    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?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width