This is a migrated thread and some comments may be shown as answers.

Radfileexplorer, want to select child node OnClientLoad

1 Answer 34 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Neha
Top achievements
Rank 1
Neha asked on 01 Mar 2014, 09:11 AM
Hi,
I want to select child node on OnClientLoad, but child node comes out to be null,
example:
-gallery
-test
    -first

when
i select "gallery" and close fileexplorer, and again open it,  get
"gallery" selected, but when i select first i get node null
i want to select "first" node also or any node level

My code is:

function explorerLoad(explorer) {                                   
            var text = window.parent.$('#ctl00_BodyContentPlaceHolder_hdnRadTreeSelectedNode').val();
            var node = explorer.get_tree().findNodeByValue(text);
            if (node) {
                node.set_selected(true)
            }           
        }


Thanks

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 05 Mar 2014, 12:24 PM
Hi Neha,

Could you please provide more details on the exact scenario you want to achieve? I am afraid that the provided information is not enough to determine what is causing the problematic behavior.

A possible cause could be the value assigned to the text variable. Note, that the findItemByValue() method expects the whole path to the folder to be passed, while the findItemByText() method can works only with the directory name.

If this is not the case, could you try to isolate the issue into a sample fully runnable project including all needed references, so we could examine locally the configuration at hand? Detailed information on how to prepare such project is available here: Isolating a problem in a sample project

Looking forward to hearing from you,
Vessy
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

Tags
FileExplorer
Asked by
Neha
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or