download file with DirectEvent on GridPanel

  1. #1

    download file with DirectEvent on GridPanel

    How is it possible to download a file with a directEvent on a node in a GridPanel. I pass the path of the file to the controller:

    .DirectEvents(de =>
                                    {
                                        de.Select.Url = "/FolderData/DownloadFile";
                                        de.Select.Method = HttpMethod.GET;
                                        de.Select.ExtraParams.Add(new Parameter("data", "record.get('path')", ParameterMode.Raw));
                                    })
    public FileResult DownloadFile(string data)
            {
                string contentType = getMimeType(data); // here is mime type
    
                return new FilePathResult(data, contentType);
            }
    i receive Bad response illegal character .
  2. #2
    forgott isUpload = true, can be closed.

    http://forums.ext.net/showthread.php...ng-DirectEvent

Similar Threads

  1. Download File using DirectEvent
    By Daniil in forum Examples and Extras
    Replies: 0
    Last Post: Dec 13, 2013, 4:02 AM
  2. [CLOSED] MVC DirectEvent Download File
    By MWM2Dev in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 17, 2013, 11:49 AM
  3. [CLOSED] How to download a file in DirectEvent?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 08, 2012, 1:20 PM
  4. [CLOSED] [1.0] DirectEvent File Download
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 21, 2011, 6:04 PM
  5. [CLOSED] [1.0] - MVC - DirectEvent Download File
    By drkoh in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 23, 2010, 8:26 PM

Posting Permissions