Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi Boolean Darstellung in Grid (https://www.delphipraxis.net/163723-boolean-darstellung-grid.html)

fillibuster 13. Okt 2011 11:21

Datenbank: MySQL • Version: 5x • Zugriff über: Unidac

Boolean Darstellung in Grid
 
Hallo,

kann ich die Darstellung von Bool Werten in einem Grid (oder auch schon aus SQL heraus) irgenwie beeinflussen? 0/1 ist für den Endanwender nicht so doll.

Viele Grüße ...

mkinzler 13. Okt 2011 11:25

AW: Boolean Darstellung in Grid
 
Du kannst das durch OwnerDraw erreichen und verwendest ein Grid mit einem entsprechenden Editcontrol.

In der Abfrage ist dass natürlich auch möglich:

SQL-Code:
select case <Booleanwert> when 1 then 'wahr' else 'falsch' end as booleanwert from <Tabelle>;

fillibuster 13. Okt 2011 11:32

AW: Boolean Darstellung in Grid
 
Danke :thumb:

stahli 13. Okt 2011 11:50

AW: Boolean Darstellung in Grid
 
Es ist auch möglich, in einem BDGrid CheckBoxen für die boolsche Darstellung und Bearbeitung anzubieten.
Es ist eine ziemliche Fummelei, aber in einem BDE-Projekt habe ich das mal funktionsfähig realisiert.
Ich könnte bei Bedarf mal einen Link raussuchen.

stahli 17. Nov 2011 16:36

AW: Boolean Darstellung in Grid
 
Ist mir gerade nochmal untergekommen...

Für CheckBox: http://delphi.about.com/od/usedbvcl/l/aa082003a.htm
und für DateTimePicker: http://delphi.about.com/b/2008/10/31...e-a-dbgrid.htm


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:54 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz