Link to home
Start Free TrialLog in
Avatar of hrvica5
hrvica5Flag for Croatia

asked on

Delphi, DBTreeVIew, Drag & Drop

Hi,

I have TDBTreeView connected on my TAdoDataSet

How can I Drag and drop without from node to node

for example
Id 15 Ā 
under id 23

When I have to update my dataset before?
And ofcourse in some folder i can't move it

15 can only go to operators.

Thx, Hrvica
sort.xls
ASKER CERTIFIED SOLUTION
Avatar of Thommy
Thommy
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hrvica5

ASKER

Yes, it has

Property DragMode and Events OnDragDrop and OnDragOver

I have TDBTreeview which is prepared in MSSQL based on another 7 tables
and has reference on TADODataset and each node has reference in another table, so if i change in another table for example Operators the treeview should be changed.

MyExample:
I should for operators put this somewhere between drag and dropping
Update Operators set operatorTypeCode,DomainCode='+otc+','+dc+' where Code='+srccode+' 

Open in new window

But first i have to check if src node is from operators
and dst node is parent for operators.
and after dropping item operator i should update table operators and move node from one branch to another

My question is where and when to take otc, dc, srccode?
When should I update table operators?


I have native TDBTreeView.


Thank you very much
Avatar of hrvica5

ASKER

I got it, thx.