Feb 13, 2014, 10:27 AM
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 .