Radupload / Radgrid / webusercontrol and masterpage

Thread is closed for posting
3 posts, 0 answers
  1. casa51
    casa51 avatar
    12 posts
    Member since:
    Oct 2008

    Posted 23 Apr 2009 Link to this post

    excuse for my english am french
    i start  to build my new back office manager with your solution.
    they start to develop in dotnet (transfer  to  asp 3.0)

    i build an news manager with
    datagrid / insert-update-delete with usercontrol ( in datagrid)
    my news manager use 2 racontrols : editor (they work fine !!!) and radupload for litle image of the news  all page are in masterpage :


    In actu.aspx they have one raddatagrid they call webusercontrol.ascx

    In webusercontrolascx they have radeditor and radupload.

    this code work when they run in single page (not include in master page)


    In masterpage the radeditor work well but the radupload return nothing I thinks i can’t find this control.

        Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand

            'Get the GridEditableItem of the RadGrid

            Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)

            Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)

            'InitializeUpdateParameter(DirectCast(e.Item.FindControl("RadUpload1"), RadUpload))

            'Get the primary key value using the DataKeyValue.

            Dim actuID As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("ID").ToString()

            'Access the textbox from the edit form template and store the values in string variables.


            Dim Titre As String = CType(MyUserControl.FindControl("titre"), TextBox).Text

            Dim Description As String = CType(MyUserControl.FindControl("RadEditor1"), RadEditor).Content

            'Dim RadUpload1 As RadUpload = TryCast(e.Item.FindControl("RadUpload1"), RadUpload)

            Dim RadUpload1 As RadUpload = CType(MyUserControl.FindControl("RadUpload1"), RadUpload)

            Dim Imageup As String

            If RadUpload1.UploadedFiles.Count > 0 Then


            End If


            For Each f As UploadedFile In RadUpload1.UploadedFiles

                If f.FileName <> "" Then

                    Imageup = f.GetName


                    Imageup = "none"

                    'Dim imaup As String =

                    'Open the SqlConnection

                End If




                'Update Query to update the Datatable

                Dim updateQuery As String = "UPDATE Actuvdotnet set TitreNews='" & Titre & "',Description='" & Description & "',Image='" & Imageup & "' where ID='" & actuID & "'"

                SqlCommand.CommandText = updateQuery

                SqlCommand.Connection = SqlConnection


                'Close the SqlConnection




            Catch ex As Exception


                RadGrid1.Controls.Add(New LiteralControl("Impossible de mettre à jour la base de donnée : " + ex.Message))

                e.Canceled = True


            End Try


        End Sub

    In master page the radeditor work well but the radupload return nothing I thinks i can find this control

    Can you help me please.

  2. casa51
    casa51 avatar
    12 posts
    Member since:
    Oct 2008

    Posted 23 Apr 2009 Link to this post

    I found  !!!!
    it my ajax manager they block something


    telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">






    <telerik:AjaxSetting AjaxControlID="RadGrid1">






    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />












     i put
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">









    now all work


  3. Neri
    Neri avatar
    3 posts
    Member since:
    Aug 2012

    Posted 22 Aug 2012 Link to this post

    Bonjour, j'ai le même problème que vous, mais je n'ai pas bien compris comment vous avez résolu le problème ?
    Merci d'avance pour votre aide
Back to Top