HI,
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
System.Threading.Thread.Sleep(3000)
End If
For Each f As UploadedFile In RadUpload1.UploadedFiles
If f.FileName <> "" Then
Imageup = f.GetName
Else
Imageup = "none"
'Dim imaup As String =
'Open the SqlConnection
End If
Next
Try
SqlConnection.Open()
'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
SqlCommand.ExecuteNonQuery()
'Close the SqlConnection
SqlConnection.Close()
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.