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

RadAsyncUpload call with buttons in RadGrid

2 Answers 174 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Raulis
Top achievements
Rank 1
Raulis asked on 17 Jan 2017, 02:48 PM

I have a RadAsyncUpload somewhere on a page and a RadGrid in the same page.The RadGrid has a column for every row that is a LinkButton which executes a grid ItemCommand. The ItemCommand fetches the ID associated to the row and stores it in a session variable. I want the item command to also then bring up the RadAsyncUpload window so the user could select files.

 

The way I tried to achieve this so far is by calling a javascript function which finds the RadAsyncUpload control and performs a button click. This does not happen after postback, however. 

 

It is crucial to me that each file I upload is associated with a row ID. Is there a way I can achieve this scenario or am I limited by the RadAsyncUpload controls functionality?

2 Answers, 1 is accepted

Sort by
0
Raulis
Top achievements
Rank 1
answered on 17 Jan 2017, 02:57 PM
Furthermore, the RadGrid does not have an Insert/Edit mode and I will not be implementing these. So the demos on the Telerik website do not work for my scenario.
0
Ivan Danchev
Telerik team
answered on 20 Jan 2017, 09:55 AM
Hello Raulis,

The AsyncUpload allows you to select a file and upload it. It does not have built-in functionality related to associating a file with something. If your scenario does not involve using the Grid's InsertCommand/UpdateCommand events as shown in this demo, you could consider implementing a Custom Handler. You can review the following demo, which demonstrates how a custom handler can be used to save an image in a database along with additional information, which in the example is the hard-coded UserID, but in your case could be the ID you keep in the session.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
AsyncUpload
Asked by
Raulis
Top achievements
Rank 1
Answers by
Raulis
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or