Confirm Message after upload file inside radgrid

2 posts, 0 answers
  1. federic batista
    federic batista avatar
    3 posts
    Member since:
    Sep 2009

    Posted 09 May 2011 Link to this post

    Hi there, im trying the telerik controls, and i wanted to know if is possible to trigger an alert after uploading a file in edititem template.

    this is my code-behind

    Protected Sub rgOferta_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgOferta.ItemDataBound
    TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then
                Dim edititem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
                Dim RadUpload1 As RadUpload = DirectCast(edititem.FindControl("RadUpload1"), RadUpload)
                Dim btns As Button = e.Item.FindControl("btnPrueba")
                 Dim estado As String = ""
                If Not btns Is Nothing Then
                    If Not RadUpload1 Is Nothing Then
                        estado = UploadFile(RadUpload1)
                        btns.OnClientClick = "showAlert('" & estado & "'); return false;"
                    End If
                End If
            End If
    end sub

    And this is my javascript which is quite simple.
       function showAlert(valor) {

    Im using radajaxmanager to ajaxified radgrid.

    any help would be appreciated.

  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 09 May 2011 Link to this post

    Hi Federic,

    The RadGrid actually uses the RadUpload control for its file uploads. There are many client-side events in the RadUpload control that you can wire-up to fire off javascript events (such as an alert!)

    Here is the link to the RadUpload client-side programming guide:

    You can also utilize the RadProgressManager for more advanced user feedback about uploads. Here is the relevant documentation regarding the RadProgressManager:

    Hope this helps!
Back to Top