Hi,
first of all my problem.
I want to use RadFileExplorer to select directories. And I want to get a notification on server that a new folder got selected.
And further assume that I only show the Treeview - else I have no problems at all - I simply use OnFolderLoaded which works.
But when using only the treeview there is no OnFolderLoaded - BUT OnClientFolderChange fires in that situation.
So from a first point of view it looks as if I got what I need.
I handle my OnClientFolderChange like this:
So far so good - it does what I like - in some situations!!
When the FileExplorer has to load something (the selected folder contains sub-folders) this call breaks the FileExplorer.
I get a "never ending" loading animation.
So I guess that my ajax call interferes with the ajax call the FileExplorer makes.
Not that big problem - I only have to queue my call if the FileExplorer already is in an ajax call.
So the idea is like this:
This looks good - and the approach works (for an example) with a grid.
BUT - neither OnRequestStart nor OnResponseEnd is fired when RadFileExplorer makes ajax calls.
So it looks as if the RadFileExplorer bypasses RadAjaxManager - or doesn't handle it properly.
I never ran in such a situation - so I don't know if RadAjax generally requires "no concurrency handling" or if this is only the fact with RadFileExplorer.
Anyhow - with RadFileExplorer I need to synchronize my calls and the ones of the explorer - and this seems to be a problem since the needed events (requeststart - responseend) do not fire.
Could someone pleas give me any advice?
Regards
Manfred
first of all my problem.
I want to use RadFileExplorer to select directories. And I want to get a notification on server that a new folder got selected.
And further assume that I only show the Treeview - else I have no problems at all - I simply use OnFolderLoaded which works.
But when using only the treeview there is no OnFolderLoaded - BUT OnClientFolderChange fires in that situation.
So from a first point of view it looks as if I got what I need.
I handle my OnClientFolderChange like this:
function OnClientFolderChange(sender, args) { var
item = args.get_item();
|
TellServerAboutSelectedElement("DIR:" + item.get_path()); |
} |
function TellServerAboutSelectedElement(argument) { |
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>"); |
ajaxManager.ajaxRequest(argument); |
} |
When the FileExplorer has to load something (the selected folder contains sub-folders) this call breaks the FileExplorer.
I get a "never ending" loading animation.
So I guess that my ajax call interferes with the ajax call the FileExplorer makes.
Not that big problem - I only have to queue my call if the FileExplorer already is in an ajax call.
So the idea is like this:
function OnClientFolderChange(sender, args) { |
var item = args.get_item(); |
if(nQueueCounter>0) { |
EnqueuRequest("TellServerAboutSelectedElement", "DIR:" + item.getPath(); |
return; |
} |
TellServerAboutSelectedElement("DIR:" + item.get_path()); |
} |
function ResponseEnded(sender, args) { |
nQueueCounter--; |
HandleQueuedCalls(); |
} |
function RequestStarted(sender, args) { |
nQueueCounter++; |
} |
function TellServerAboutSelectedElement(argument) { |
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>"); |
ajaxManager.ajaxRequest(argument); |
} |
BUT - neither OnRequestStart nor OnResponseEnd is fired when RadFileExplorer makes ajax calls.
So it looks as if the RadFileExplorer bypasses RadAjaxManager - or doesn't handle it properly.
I never ran in such a situation - so I don't know if RadAjax generally requires "no concurrency handling" or if this is only the fact with RadFileExplorer.
Anyhow - with RadFileExplorer I need to synchronize my calls and the ones of the explorer - and this seems to be a problem since the needed events (requeststart - responseend) do not fire.
Could someone pleas give me any advice?
Regards
Manfred