Results 1 to 7 of 7

Thread: Data Grid and Displaying Boolean Types...How?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Dallas,TX
    Posts
    170

    Post

    I have a MS DBGrid 6.0 control that has been populated with data from a MS Access 2000 DB using a DataEnvironment.

    Anywho, I have some Boolean values stored in the database. After the SQL statement populates my Grid, these boolean values are displayted as either a 0 or -1. Is there a way to create a checkbox in a column instead of the default text cell?

    Thanks mucho,
    Philip

  2. #2
    Guest

    Post

    The first thing you have to do is go the properties of the grid. when you select custom propertie. a window will appear.
    go to the tab columns and select by numberformat. the value you want to display on your grid. If you created the grid by code you can use this line of code with it.

    DBGrid.Columns.Item(x).NumberFormat = "Yes/No"

    or

    DBGrid.Columns.Item(x).NumberFormat = "True/False"

    x stands for the column number.

    - goodluck

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Dallas,TX
    Posts
    170

    Post

    Right On, thanks for the info my friend

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Dallas,TX
    Posts
    170

    Post

    That works pretty darn well, although, I would much rather prefer a check box. I've seen it done before on other applications that operated much like a Grid control. Anywho, does anyone know of a way to qualify a bool column as CheckBoxes instead?

    Thanks!

  5. #5
    New Member
    Join Date
    Feb 2000
    Posts
    2

    Post

    VideoSoft VSFlexGrid Pro 6.0. This came with a book called "Database Access With Visual Basic 6" that I just bought. If you find one that works like the Hierarchical FlexGrid Control, please let me know.

    Originally posted by PhilipG:
    That works pretty darn well, although, I would much rather prefer a check box. I've seen it done before on other applications that operated much like a Grid control. Anywho, does anyone know of a way to qualify a bool column as CheckBoxes instead?

    Thanks!

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Dallas,TX
    Posts
    170

    Post

    This is from Videosoft's webpage on FlexGridPro VERSION 7.0 which is the newest:

    "You can even use VSFlexGrid Pro as an outliner for displaying data hierarchically: it behaves like a Tree control, displaying nodes that can be collapsed or expanded to show branches containing additional data."

    Thanks for the info!
    Philip

  7. #7
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    As keen readers of this bulletin board will know I rave on about Apex TrueDBGrid almost daily. It will do everything you've said above and it IS the most feature-rich and easy to use Grid Control you can get for VB.
    www.ApexSC.com



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



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