Hello,
I am working with telerik ui for asp.net mvc.
I have a textbox named path of poste.
By entering, it should show me the tree view of my local directories in a window.
when I select a directory, I need to show only the full path in my text box.
So i need to show the path of the selected folder from my local folders. How can I do this ?
Any help or suggestions please ?
4 Answers, 1 is accepted

To be more clear..
I have a text box and a button. When i chick the buttonn i need to get the browse option so that i can browse all folders in my system, after that if i select the folder, the folder path should be displayed in my TextBox like C:/Users/myFolder/ in textbox.. also when select an UCN path.
I did not find the way to do this !
It would be much appreciated if you can help me on this.
Thanks for replying
Hello Wassim,
The TreeView component does not allow browsing the local computer directories but rather gives a representation of hierarchical data in a tree structure.
What I can suggest is to represent the desired directories in the treeView and in the Change or Check event handlers to manually set the TextBox value. For example:
.Events(events => events
.Change("onChange")
)
...
<script>
function onChange(e) {
var treeView = e.sender;
selected = treeView .select(),
directory= treeView .dataItem(selected).text;
var textbox = $("#textbox").data("kendoTextBox");
textbox.value(directory);
}
</script>
Let me know if you have any questions.
Regards,
Nikolay
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Thanks for replying.
Yes, you are right. I understood that a browser does not allow to select a folder from a network share or a location on the web server.
But I don't have a treeview component.
I have juste a textBox and a button when clicking i can browse all folders in my system, after that if i select the folder, the folder path should be displayed in my TextBox.
Any suggestions?
Best regards,
Hi Wassim,
I can suggest checking out the approaches shared in the following SO threads. Please note that in general, for security reasons sharing a file directory with a web application is not a good practice.
Let me know if you have any questions.
Regards,
Nikolay
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.