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

Search functionality + ajax problem

1 Answer 91 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jan Ove
Top achievements
Rank 1
Jan Ove asked on 04 Aug 2010, 01:57 PM
Hi!

I use a file explorer with a custom content provider to show documents from a database (similar to your demo project). This works well with basic functionality, but I have come across a couple of problems when trying to implement some extra functionality.

1 - Recursive search
I need to be able to search for files and folders in currently selected folder and all subfolders recursively. The search itself is easy, for now I display the search result in a repeater on the side of the file explorer, showing name of the file/folder found and the containing folder. When one clicks on an entry, I use a client side function to navigate to the containing folder using the following function:

function NavigateTo(path) {
    var explorer = $find("<%=FileExplorer.ClientID %>");
    explorer.set_currentDirectory(path, true);
    explorer.refresh();
}

The grid part of the file explorer is updated properly, but the treeview part is not updated to reflect the new current directory. The treeview part flickers and 'loading image' is displayed (and goes away), but the folder specified is not loaded or selected in the treeview (as shown in attached image named 'fileexplorer_search.jpg' below). I have tried to use loadFolder() instead of set_currentDirectory(), with same result. Is this a bug, or am I doing something wrong?

2 - Notify server when item is selected in grid
When a user selects an item in the grid, I use the OnClientItemSelected event to send an ajaxRequest to the server with the path to the item. On server side I use this to populate separate user controls which handles some extra functionality.
This works fine (though an server side event for selected item would have been appreciated...), until one double clicks a folder in the grid part. This triggers item selection, ajax request is sent and user controls updated, but the file explorer usually hangs (grid part greyed out with an endless loading image animation displayed). This is similar to the issue in this article, but that solution don't work (node_populating happens after OnClientItemSelected event is finished, so can't enqueue it there). Anyone have a suggestion on how to solve this? Is it possible to disable doubleclicking in grid part for folders?

With regards,
Jan Ove

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 09 Aug 2010, 10:33 AM
Hi Jan,

Your scenario looks like a bit complex. This is why, could you please open a new support ticket and send me a runnable project which shows the described issues? I will check it on my side and do my best to provide a working solution as soon as possible.

Best wishes,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
FileExplorer
Asked by
Jan Ove
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or