1

Topic: Component DBGrid and operation with Columns...

On the form I use component DBGrid c connection to ADOQuery.
In Query I create different requests to tables with a different amount of columns.
As it is possible received to rename and specify columns the sizes.
P.S.
On demand I know what fields will be and how many them.
Yours faithfully Anatoly With.

2

Re: Component DBGrid and operation with Columns...

Anatoliy S.;

DBGrid. Columns [2].Title: = ' the Column 2 ';

3

Re: Component DBGrid and operation with Columns...

, ": =" on "=" it is necessary to replace

4

Re: Component DBGrid and operation with Columns...

DBGrid-> Columns [2]-> Title = ' the Column 2 ';

Not the correct construction an error.

5

Re: Component DBGrid and operation with Columns...

I can is wrong made?
Correct ....

DBGrid-> Columns [2]-> Title = ' the Column 2 ';

6

Re: Component DBGrid and operation with Columns...

Anatoliy S. wrote:

I can is wrong made?
Correct ....

DBGrid-> Columns-> Items [2]-> Title = "the Column 2";

7

Re: Component DBGrid and operation with Columns...

DBGrid-> Columns-> Items [2]-> Title = "the Column 2";

Do not prompt how to convert in char. I so understand a line AnsiString or String, I am necessary in char.

8

Re: Component DBGrid and operation with Columns...

Anatoliy S. wrote:

DBGrid-> Columns-> Items [2]-> Title = "the Column 2";

Do not prompt how to convert in char. I so understand a line AnsiString or String, I am necessary in char.

char* p = DBGrid-> Columns-> Items [2]-> Title.c_str ();

9

Re: Component DBGrid and operation with Columns...

Instead of so?
DBGrid1-> Columns-> Items [1]-> Title-> Caption = "DEFAULT_CHARSET";
DBGrid1-> Columns-> Items [1]-> Width = 77;
And the text not the unicode?

10

Re: Component DBGrid and operation with Columns...

Thanks huge for the help. All turned out.