Results 1 to 3 of 3

Thread: Selecting a record from a Flex Grid in VB6

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    19
    OK, I tried Dr. Evil's code on the link that was provided, but I was not able to get it to work. Let me try this again:

    I have a form which searches a DB. If multiple records are pulled from the query, it loads another form with an MS Flex Grid. From there, I want the user to be able to double click one of the records and have it load some controls on the other form.

    1) I don't know that there is a double click event on the MS Flex Grid (a double click event for a single row, not the entire grid)

    2) Is there some creative code to emulate a double click event, allowing the user to select a specific record from the Flex Grid?

    3) Is there a better control to use than the Flex Grid?

    Thanks a lot.

    FLL

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Cool

    I could be wrong here, so someone correct me if I am.

    FLL, to the best of my knowledge, the MSFlexGrid is read-
    only, and thus any recordset that it is connected to does
    not change records when the grid is clicked. I haven't
    used it a whole lot, though, so I could be wrong on that
    part.

    One other control that you could use is the DataBound Grid
    Control. You will have to connect it to an ADO recordset.
    When you click on any row, the recordset moves to that
    particular row. Then in the DBGrid's DoubleClick event,
    you could add your code to do what you need to do, based on
    the current record of the recordset. Don't forget to set
    the DBGrid's AllowAddNew, AllowDelete, and AllowUpdate
    properties to false so that the user can't change the data.

  3. #3
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    MSFlexGrid is read only, but what i found out today is to install the Data Bound Grid i had to jump thru hoops, If you've never had a previous version of VB - VB6 does not install the liscensing info for Data Bound Grid
    or i installed wrong, either or it really pissed me off...

    MSHFlexGrid is a litle more flexible though

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