RadAsyncUpload call with buttons in RadGrid

3 posts, 0 answers
  1. Raulis
    Raulis avatar
    16 posts
    Member since:
    Jun 2016

    Posted 17 Jan Link to this post

    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. Raulis
    Raulis avatar
    16 posts
    Member since:
    Jun 2016

    Posted 17 Jan in reply to Raulis Link to this post

    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.
  3. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1213 posts

    Posted 20 Jan Link to this post

    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.
Back to Top