How to save the tree modified in the program in the DBF database ?

HMG Samples and Enhancements

Moderator: Rathinagiri

Post Reply
kjedroska
Posts: 3
Joined: Fri Jan 10, 2025 10:48 pm
DBs Used: DBF

How to save the tree modified in the program in the DBF database ?

Post by kjedroska »

Hi
I'm new here.
I have been using HMG for a short time.
I have a problem with the 'tree' control.
I would like to be able to save data about the tree modified in the program in the DBF database.
Unfortunately I don't know how to do it.
I was hoping that the ParentValue propertie would help me. Unfortunately, it doesn't work properly in version 3.4.4 (32 bit) or 3.6 (64 bit).
To sum up, I want:
- build a tree based on data saved in the dbf database
- save the tree modified in the program to the database
I'm asking you for help.
regards
Krzysztof
User avatar
mol
Posts: 3763
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to save the tree modified in the program in the DBF database ?

Post by mol »

Hi! Try to search on the forum. This problem was presented few years ago
User avatar
miszler.zoltan
Posts: 24
Joined: Sun May 26, 2013 12:37 pm
Location: Hungary
Contact:

Re: How to save the tree modified in the program in the DBF database ?

Post by miszler.zoltan »

Szia, csak néhány kulcsszó: base64, json.
Hi, just a few keywords: base64, json.
User avatar
serge_girard
Posts: 3258
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: How to save the tree modified in the program in the DBF database ?

Post by serge_girard »

Krzysztof,

Welcome!

As Marek and Mizler said the forum is full of examples and solutions!

Serge
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3763
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to save the tree modified in the program in the DBF database ?

Post by mol »

Hi Krzysztof!
To save kategories, I have a dbf with such a fields:
IdKategorii N 6
RodzajKategorii N 1 // określa wydatek/wpływ
IdKategoriiNadrzednej N 6
NazwaKategorii C
Nieaktywny L // used or deleted (hidden for user)

In such a structure you can save your tree
kjedroska
Posts: 3
Joined: Fri Jan 10, 2025 10:48 pm
DBs Used: DBF

Re: How to save the tree modified in the program in the DBF database ?

Post by kjedroska »

Sorry, guys
I think you misunderstood me.
I have a problem with the 'tree' control.
I would like to use this control to build a tree.
I would then like to save the data from this control to the DBF database so that I can recreate the tree.
I can't find the data defining the parent of the element in this "Tree" control.
Property 'Parent' in "Tree" control doesnt return this data.
edk
Posts: 995
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: How to save the tree modified in the program in the DBF database ?

Post by edk »

Krzysztof, spójrz na ten post: https://www.hmgforum.com/viewtopic.php?p=65890#p65890, może będzie pomocny. Co prawda struktura drzewa jest zapisywana w json, ale nic nie stoi na przeszkodzie aby zapisać ją w DBF. Spróbuj to zrobić w ramach ćwiczeń z HMG.
kjedroska
Posts: 3
Joined: Fri Jan 10, 2025 10:48 pm
DBs Used: DBF

Re: How to save the tree modified in the program in the DBF database ?

Post by kjedroska »

Hurry !!!
Thanks edk :-)
Post Reply