Click to See Complete Forum and Search --> : Data Grid and Displaying Boolean Types...How?
PhilipG
Jan 19th, 2000, 09:45 AM
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
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 :)
PhilipG
Jan 20th, 2000, 06:54 AM
Right On, thanks for the info my friend
PhilipG
Jan 20th, 2000, 07:27 AM
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!
CMerc
Feb 15th, 2000, 06:13 AM
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!
PhilipG
Feb 15th, 2000, 09:20 AM
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
Buzby
Feb 15th, 2000, 04:35 PM
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 (http://www.ApexSC.com)
------------------
Mark "Buzby" Beeton
VB Developer
BuzbyB@HotMail.Com
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.