Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Thread Tools Display Modes
Old 04-14-2000, 05:56 AM
Posts: n/a
Default Can you uncheck CheckBox in TwwDBGrid?


My problem is that I can't. I can check it, but then I can't uncheck. Is it a bad setting, or something else?

Please help!

Thanks in advance!
Reply With Quote
Old 04-15-2000, 06:48 AM
Posts: n/a
Default RE: Can you uncheck CheckBox in TwwDBGrid?

The values you use must be an either/or setup. Say you use an alpha field, A1, with values Y or N. You can click on the record in question on the column (field) and, on that event, check the field for Y or N. If it is Y, change it to N and vice versa. Did you double click the Grid, highlight the field, and go to the Edit Control tab? Use the drop down on "Control type" and check "Check Box". You can enter the value when it is checked (say Y) and when unchecked (say N). You could also use a button so you could go to a record, click the button and it will change the Checked or Unchecked mode. Here is code.

procedure TForm1.ChangButton(Sender: TObject);



*if Table1.FieldByName('YorN').asString = 'N' then

* *Table1.FieldByName('YorN').asString := 'Y'


* *Table1.FieldByName('YorN').asString := 'N';




Reply With Quote
Old 04-16-2000, 11:54 PM
Posts: n/a
Default RE: RE: Can you uncheck CheckBox in TwwDBGrid?

Hello George!

Thanks your replay! End my problem more precisely: I use Delphi3, InfoPower3 and MS Access97 database. I use boolean field and I double clicked on the grid, highlighted the field, clicked on the EditControl tab, set CheckBox, specified the checked and unchecked values for "true" and "false". And when I use it, I can set the CheckBox state from unchecked to checked, but I can't set the state from checked to unchecked. But if I make another single CheckBox outside the Grid associated with the same database field, it obviously works fine.

If you interested in, I can send an exaple.

Thanks: SAS
Reply With Quote
Old 04-18-2000, 10:39 AM
Posts: n/a
Default RE: RE: RE: Can you uncheck CheckBox in TwwDBGrid?

I went back to my test program and changed the field I used to a Boolean. I was able to change back and forth from checked to unchecked to checked. I use Delphi 5 and InfoPower 2000 but I don't think that should matter. I'd be happy to look at your code. Send it to me.

Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:22 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.