Solved

Check Box in DBGrid?

Posted on 2002-04-07
9
328 Views
Last Modified: 2010-04-04
Hi All,

I'm new to Delphi...

I have an access database which, when I open in Access, one of the fields (Boolean) appears as a checkbox. When I open the table in Delphi6, the field contains True or False. Is there any way I can get the DBGrid to show a checkbox instead?

Thanks,
Freerider.
0
Comment
Question by:Freerider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 45

Expert Comment

by:aikimark
ID: 6924226
listening & learning
0
 
LVL 5

Expert Comment

by:alanwhincup
ID: 6924301
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 6924617
Take a look at http://www.delphi3000.com/article.asp?ID=2151 for 'Displaying a checkbox within a DBGrid for use with Boolean fields' article .
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 6924667
also could just use the DBCheckbox and assign to required field.
0
 

Author Comment

by:Freerider
ID: 6929044
Thanks Alan, but I didn't really understand the explanation @truepath.com - can you make it a bit easier to understand??

ginsonic, I couldn't find the link at delphi3000.com

Still looking...
Freerider.
0
 
LVL 5

Expert Comment

by:alanwhincup
ID: 6930254
All the code is basically doing is drawing a checkbox inside of any Boolean fields within a dbgrid. What exactly is it you don't understand about it? Anything specific, or just all of it?
0
 

Author Comment

by:Freerider
ID: 6935189
The problem is my limited understanding of the structure of Delphi programming - I couldn't see from the example, how I could recreate it in my program (ie which controls I should put on the form).

It doesn't matter now, cos I took inthe's advice and used a DBCheckBox instead - I don't really need the DBGrid...

Thanks,
Freerider
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 6936522
Freerider ,
I just tested the link and is OK . But before read , you must register to this site.

For the most options  you must to pay but ....

The registration is FREEWARE and the first 50 articles from the base are FREEWARE too . You must to pay JUST if you wish to search more articles in the base.

In same time if you visit every day this site you can read the last article posted in that day for FREE .

So if you don't wish to pay visit every day this site and can read forever the new articles .
0
 
LVL 4

Expert Comment

by:nestorua
ID: 6937546
HI, FreeRider,
All what you want you can do by yourself, it's not so difficult as it seems from the first sight.
You must put TCheckbox component on your from with DBGrid
and in the OnDrawColumnCell DBGrid event write the code
to place the CheckBox on that cell which is currently selected (with a width and a height equal to the corresponding Rect).
The rest is simple (to fill OnClick event of the CheckBox).
Sincerely,
Nestorua.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question