Tree Control retrieve selected value.

  • 17 April 2019
  • 3 replies
  • 6 views

Badge +8

Hi,

 

Scenario:

User will select from the tree control below and whatever is selected is saved to database.

The next time he login he wants to see the selected vaue.

 

Selected values (Toyota, Volvo)

When I display the page, I want that Toyota and Volvo as checked. 

 

How to display the selected value to tree control?

 

ex. 1. Car

           Toyota

           Mitsubishi

           Audi

      2.  Truck

            CAT

             Volvo

 

Thanks


3 replies

Badge +10
Hi, On the tree control there is a property called "Value Path". Save this to the database and use that to load the values. You will set the Tree control's value to this returned value upon Form load and this will check the previously selected values. Hope this helps! Regards, JohanL
Badge +8
I used Value path to retrieve during loading but it didn't work.
I used different approached ;
- transfer data
- set control
Both failed
Badge +10

Hi,

 

I tried this again and actually loaded it with the ValuePath property and it does work.

 

I've created a small application in K2 5.3 with FP02 which is attached.

 

You can deploy this to see how I did it and just check your rules.

 

Regards,

JohanL

Reply