Results 1 to 4 of 4

Thread: Boolean fields, combo's, etc. in a datagrid?!?!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Horst
    Posts
    262
    Hi group,

    Some time ago I posted a question concerning a boolean field in a datagrid. The original message is below. In short:
    I want to add checkboxes and a combobox to my datagrid.

    Q1: Is it possible? So, Can it be done?

    Q2: If so, how? Where can I get an example?

    Q3: Is there another way? Can I get around a datagrid?

    Thnx.

    -----
    (Original question)
    I have question about a datagrid.

    I fill my datagrid with a recordset. In this recordset is a boolean field. So when I load the datagrid i get values like:
    true
    true
    false
    false
    false
    true
    etc.

    Is it possible to show a checked checkbox for true and an empty checkbox for false?

    Thnx in advance!

    Regards,

    visualsander

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    188
    You could try using a dynamic control array to create your own grid. It takes a bit more work but then you could work in any controls you want such as checkboxes, comboboxes, datetime pickers etc.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Horst
    Posts
    262

    Unhappy Dynamic control array?

    Thanks for the fast reply.

    Buttuuuuuh, can you explain to me the dynamic control array?

    I (think I) know wat a control array is. A couple of control's (like a textbox) with an index, right?

    Hope to hear from you!

    visualsander

  4. #4
    Addicted Member
    Join Date
    May 2000
    Posts
    188
    a dynamic control array is where you place these controls on the form using code.

    Just to get you started placing a control would involve something like this:

    n = Text1.UBound + 1
    Load Text1(n)

    The control will be created with the same properties (position, size etc.) of the Text1(1) control. You will then need to move the control and then make it visible.

    It can get pretty complicated when you need to start including scroll bars etc. to make everything visible etc. I would suggest finding a book or maybe an article on the internet or something to get you started. I learned the basics from "Using Visual Basic 6 Platinum Edition" By: Loren D. Eidahl, Published By: QUE ISBN: 0-7897-1916-9 I'm sure there are other books out there too that you could use.

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