few questions 
Author Message
 few questions

Hello!

I have few question and I would really appriciate if somebody can help me.

1. Is it possible to make table in delphi which looks like table below and
have some relationship with database (TTable or TQuery)

-------------------------
|     Column 1     |
-------------------------
| Col11  |  Col12 |
-------------------------
| Data   |  Data   |
| Data   |  Data   |
| Data   |  Data   |
| Data   |  Data   |
| ...       | ...       |

2. Say I have Paradox table and one of column of this table is also surname.
Then additionally I have TEdit field.
   When user type beginning of surname cursor in table should go to that
record where surname starts with what user    has typed into. Any ideas how
this could be done.

3. Is it possible to disable repainting of DBGrid component or any other. If
so, how?

4. What is the best way for printing out DBGrid table?


Best regards,
Matjaz



Wed, 18 Jun 1902 08:00:00 GMT  
 few questions
Hi (zivijo) Matjaz!

Look below!

Beno


Quote:
> Hello!

> I have few question and I would really appriciate if somebody can help me.

> 1. Is it possible to make table in Delphi which looks like table below and
> have some relationship with database (TTable or TQuery)

> -------------------------
> |     Column 1     |
> -------------------------
> | Col11  |  Col12 |
> -------------------------
> | Data   |  Data   |
> | Data   |  Data   |
> | Data   |  Data   |
> | Data   |  Data   |
> | ...       | ...       |

I don't really understand this question but if you mean if related tables
can be used, the ansver is yes. You have to use two tables and two
datasources. MasterSource property of "slave" table should point to
"master's" table datasource and MasterFields property should "connect"
related fields.

Quote:
> 2. Say I have Paradox table and one of column of this table is also
surname.
> Then additionally I have TEdit field.
>    When user type beginning of surname cursor in table should go to that
> record where surname starts with what user    has typed into. Any ideas
how
> this could be done.

First, surname field must have a key.
Table's IndexName property should point to that key.
Then, on OnChange event of TEdit control enter following code:
Table1.FindNearest([Edit1.Text]);
Quote:

> 3. Is it possible to disable repainting of DBGrid component or any other.
If
> so, how?

You can disable repainting all controls related to a table with
Table1.DisableControls and then enable it with Table1.EnableControls.

- Show quoted text -

Quote:
> 4. What is the best way for printing out DBGrid table?
Using QuickReport.

> Best regards,
> Matjaz



Wed, 18 Jun 1902 08:00:00 GMT  
 few questions

Quote:

>Hello!

>I have few question and I would really appriciate if somebody can help me.

>1. Is it possible to make table in Delphi which looks like table below and
>have some relationship with database (TTable or TQuery)

>-------------------------
>|     Column 1     |
>-------------------------
>| Col11  |  Col12 |
>-------------------------
>| Data   |  Data   |

You can add  a panel or a button above the DBGRid (containing col11 and
col12). The use DisplaySize (can remember the property name) to set on of
these. It is possible to capture the size on some events of the grid to get
the size of the fields.
I used buttons once , becuause I needed to have clickable headers. Ask me if
you want the code, I'll whether I can find it...

Quote:

>2. Say I have Paradox table and one of column of this table is also
surname.
>Then additionally I have TEdit field.
>   When user type beginning of surname cursor in table should go to that
>record where surname starts with what user    has typed into. Any ideas how
>this could be done.

Depending on your database structure I can say how , but use Locate somehow.
Is the surname a field ?

Quote:

>3. Is it possible to disable repainting of DBGrid component or any other.
If
>so, how?

?????? Visible = False ???? what do you want ?

Quote:

>4. What is the best way for printing out DBGrid table?

By QR there are several solutions. Use DetailBands/SubDetailbands, or a
StringList to create labels dynamically as needed.

S.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. A few questions......

2. A few questions for Delphi & MS Access

3. A few questions and an offer

4. A few questions: problem with FindFirst/FindNext, serial communications and SB/SBPro access - [READ]

5. A few questions

6. A few Questions.

7. A few questions: problem with FindFirst/FindNext, serial communications and SB/SBPro access

8. A few questions about hooking Delphi 2.0 up to Oracle via ODBC

9. A few questions

10. A few questions...

11. A few questions about Delphi 6 Standard and Pro

12. few questions about MS-Access db + How do i add/read/modify lines in a Memo field ?!?!

 

 
Powered by phpBB® Forum Software