I
I
Ilya Brazhnikov2017-04-29 21:00:46
1C
Ilya Brazhnikov, 2017-04-29 21:00:46

How to programmatically fill the value tree in a managed form 1C 8.3?

There is a general selection form in which there is a tree of values ​​that I want to fill out from a remote database with which I connect via COM.
0065ebc50c6f4bbca7d0c611ceb49a89.png
How can I populate it so that the items are displayed in groups rather than a solid list? Wherever there is mention of this topic, people create a tree dynamically and populate it from a query. Is it possible to fill a tree without a request?
afaca4c8b18a4dd5819a45298d3eb27d.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kinash, 2017-04-29
@Ilyabr

Yes, of course you can. The root of the tree and each subordinate row has a predefined "Rows" property of type "ValueTreeRowsCollection" that can be used to create, modify, and delete rows lower in the hierarchy. More details in the syntax helper.
I will add. You don't have a Value Tree on your form, but a FormDataTree. To transfer one object to another, you must first call FormAttributeToValue(), and after the tree is formed, return it to the form using ValueToFormAttribute().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question