Diman
Admin
 Admin
| Posts: 1495 |  | Karma: 19 |
|
RE: NCDBTreeView
|
|
Posted: 2000/06/17 15:55 |
|
|
|
|
Hi !
Okey. That is very easy 
First at all, TNCDBTreeView has properties, that determines set of data. This properties allows to define it using SQL phrases: - SQLFrom - table name, or table names. This values is substituted into FROM phrase of SQL query. - SQLWhere - WHERE phrase. - etc...
Now TNCDBTreeView has two modes (HierarchyType), that determines how hierarchy will be builded: - htOwnerPointers - hierarchy is builded, using fields that are pointers from more low to more upper level. - htKeySegments - hierarchy is builded, using segments of key value. For example code has two segments: 100 101 102 200 201 202 ....
Now you must define value of KeyFields. In case of htOwnerPointers - define OwnerFields, that are fields pointing to upper level KeyFields. In case of htKeySegments you must define KeySegments, if use example, then: Length = 1, Empty = '0' Length = 2, Empty = '00'
Now time to define what user will see in the tree. It is defined by DisplayFields and DisplayFormat. DisplayFields may contains more then one field: 'CODE;NAME'. Display format contains format string, like that: '[%0] - %1'. There %N is index of field from DisplayFields.
|
|