We're having a problem with the RadFileExplorer.OnClientItemSelected javascript method. The method always gets the data for the first file item instead of the selected one. Here is the javascript:
function OnClientItemSelected(sender, args)
{
if (args.get_item().get_type() == Telerik.Web.UI.FileExplorerItemType.File)
{
// if the item is a file
var file = ""File path : "" + args.get_item().get_path() + ""\n"";
file = file + ""File size : "" + args.get_item().get_size();
var label = $get(""" + labelClientID + @""");
label.innerText = file;
alert(""Selected file: \n"" + file);
}
else
{// folder
alert(""The selected item is a directory"");
}
alert(""OnClientItemSelected : "" + (args instanceof Telerik.Web.UI.RadFileExplorerEventArgs).toString());
}
So it seems that the args.get_item() is always selecting the first file item. How do we fix this? I've also attached a screenshot. You can see the info in the label is for the first file instead of the selected one.
function OnClientItemSelected(sender, args)
{
if (args.get_item().get_type() == Telerik.Web.UI.FileExplorerItemType.File)
{
// if the item is a file
var file = ""File path : "" + args.get_item().get_path() + ""\n"";
file = file + ""File size : "" + args.get_item().get_size();
var label = $get(""" + labelClientID + @""");
label.innerText = file;
alert(""Selected file: \n"" + file);
}
else
{// folder
alert(""The selected item is a directory"");
}
alert(""OnClientItemSelected : "" + (args instanceof Telerik.Web.UI.RadFileExplorerEventArgs).toString());
}
So it seems that the args.get_item() is always selecting the first file item. How do we fix this? I've also attached a screenshot. You can see the info in the label is for the first file instead of the selected one.