Version 1.0
05.11.2008
Author: Alen Markov
Version History
Version
1.0
Date
05.11.2008
Name
AMA
Description
Initial Version
INHALT
1
Question....................................................................................................................... 3
1.1
1.2
Testtable ................................................................................................................................................. 3
4 Components for accessing the DB with that table .............................................................................. 4
1.2.1 TDataSource.................................................................................................................................. 4
1.2.2 TIBQuery........................................................................................................................................ 5
1.2.3 TIBDatabase .................................................................................................................................. 6
1.2.4 TIBTransaction............................................................................................................................... 7
1.3 cxGrid - DataController - Datasource ..................................................................................................... 8
1.4 Defining the columns which the cxGrid should display .......................................................................... 8
1.5 Making cells editable ............................................................................................................................ 12
1.6 Display .................................................................................................................................................. 13
1.7 Problem ................................................................................................................................................ 14
Solution ...................................................................................................................... 15
2.1
2.2
Seite 2
Question
1.1
Testtable
Seite 3
1.2
Nun habe ich ein cxGrid auf's Formular gelegt. Damit die Tabelle im Grid angezeigt wird, habe ich die
markierten 4 Komponenten auf's Formular gelegt:
TDataSource
Seite 4
1.2.2
TIBQuery
Seite 5
1.2.3
TIBDatabase
Seite 6
1.2.4
TIBTransaction
Seite 7
1.3
So the cxGrid knows which data has to be displayed, we have to choose here the DataSource:
1.4
Seite 8
Seite 9
Seite 10
Seite 11
1.5
Um jetzt im Grid Daten editieren zu knnen, habe ich noch diese Properties auf TRUE gesetzt:
Seite 12
1.6
Display
Seite 13
Klicking on the same cell again, the cursor shows up - it seems like it's possible now to edit the cell
1.7
Problem
Seite 14
Solution
2.1
Seite 15
2.2
TIBDataSet
2.2.1
SelectSQL
TIBDataSet also has a property "SelectSQL" (I inserted here the same SQL as I did before in TIBQuery).
Setting the property ACTIVE to TRUE, the cxGrid is already showing the table:
Seite 16
Seite 17
2.2.2
Datenmengen Editor
To make the cells in the cxGrid ediable (and that the navigator Buttons "+" and "-" become enabled),
it was necessary to do this (sorry, just have the german version - but it should be clear with the screenshots):
Seite 18
Seite 19
Seite 20
Seite 21
Seite 22