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
    If
    TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then
                'popup&editform
                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) {
          alert(valor);
        }

    Im using radajaxmanager to ajaxified radgrid.


    any help would be appreciated.


    regards
  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:
    http://www.telerik.com/help/aspnet-ajax/upload-client-side-basics.html

    You can also utilize the RadProgressManager for more advanced user feedback about uploads. Here is the relevant documentation regarding the RadProgressManager:
    http://www.telerik.com/help/aspnet-ajax/upload-progress-radprogressarea.html

    Hope this helps!
    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top