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

OnItemCommand Firing multiple times

1 Answer 65 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Atlas
Top achievements
Rank 1
Atlas asked on 03 Mar 2010, 10:19 PM
I have added an OnItemCommand to my FileExplorer control, and it is firing once per file uploaded. If I attempt to upload three files at once, the command fires three times?? I would expect it to fire only once.

1 Answer, 1 is accepted

Sort by
0
Atlas
Top achievements
Rank 1
answered on 04 Mar 2010, 05:36 PM
Problem solved:
void RadFileExplorer1_ItemCommand(object sender, RadFileExplorerEventArgs e)  
{  
    UploadedFile currentUploadedFile;  
    if (e.Command == "UploadFile")  
    {  
        foreach (UploadedFile file in explorer.Upload.UploadedFiles)  
        {  
            string currentUploadedFileName = VirtualPathUtility.GetFileName(e.Path);  
            if (file.GetName() == currentUploadedFileName)  
            {  
                currentUploadedFile = file;  
                break;  
            }  
        }  
    }  
   
    // use the currentUploadedFile  
Tags
FileExplorer
Asked by
Atlas
Top achievements
Rank 1
Answers by
Atlas
Top achievements
Rank 1
Share this question
or