Page 1 of 1

Runtime file selection box

PostPosted: 05 Dec 2016 12:46
by Eric.P
Hi community !

On the client side (admin managment) i have a grid where each row correspond to a server system command like "upload file", "move file", "list files" etc...
So on the onScroll event of the dataset i would like to use the fileupload component if the command is "upload file".

I put the file upload component visible false on the form.
The behaviour expected is the same that if i click on the component when it's visible ( = Show the selection file dialog).

I didn't find a method to trigger the dialog :s

Do you have a trick to do that ?

Thanks.

Re: Runtime file selection box

PostPosted: 05 Dec 2016 14:35
by Eric.P
Re,

One of my coworker found a trick that does the expected behaviour.
I can simulate the click by adding javascript code like that :

CGAddJavaScriptToAjaxResponse(IWCGJQFileUpload1.GetIDJQuery + '.find("input").click()');

Is there a properly method on the component like "TriggerFileDialog" on something like that in the last beta release ?

Thanks

Re: Runtime file selection box

PostPosted: 05 Dec 2016 15:35
by Alexander Bulei
Hello,

Due some browser's restriction, there is no any "cross-browser" way to trigger the dialog..

Of course, you can trigger the click on client side, but in some browsers it will fail.

Best Regards.

Re: Runtime file selection box

PostPosted: 05 Dec 2016 15:51
by Eric.P
Ok,

Thank you for the detail.