Board index » cppbuilder » How to set boolean QueryTableProducer fields
How to set boolean QueryTableProducer fields
2005-10-27 03:24:01 PM
Does anyone knows, how to set the values of a boolean QueryTableProducer
At this time, i get the text "true" or "false" as result of the
QueryTableProducer. I want to have a simple "1" or "0".
The datasource is a normaly Query with formated boolean fields.
( ( TBooleanField * ) Query1->Fields->FieldByNumber (8) )->DisplayValues =
If i check the Query with:
tmp = Query1->Fields->FieldByNumber (8)->AsString;
i get my whanted values.
But on the Tableproducer i get the text true or false, because the Query
datafield is boolean.
I try to set the DisplayValues from the TableProducer with
(( TBooleanField * )
QueryTableProducer1->DataSet->FieldByName("PWR"))->DisplayValues = "1;0";
but this doesn't work (I set this before i get the
QueryTableProducer1->Content () )
Shure: i can use the QueryTableProducer1FormatCell event to change the
values, but this takes 15 seconds!!!! in my big Table......
The user can't wait 15 seconds for the table... :-(
Anyone there, who know how to set the DisplayValues ????
Perhaps over: QueryTableProducer1->Columns->Items[i]->??