Hi there
I am trying to set the image manager paths, in an editor, in a template column of a radgrid from code behind like this:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)
If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
Dim editor1 As RadEditor = e.Item.FindControl("Radeditor1")
Dim UserId As String
UserId = Membership.GetUser().ProviderUserKey.ToString()
editor1.ImageManager.ViewPaths = New String() {"~/images/users/" + UserId + "/uploads"}
editor1.ImageManager.DeletePaths = New String() {"~/images/users/" + UserId + "/uploads"}
editor1.ImageManager.UploadPaths = New String() {"~/images/users/" + UserId + "/uploads"}
editor1.ImageManager.EnableAsyncUpload = True
editor1.ImageManager.SearchPatterns = New String() {"*.jpeg", "*.jpg", "*.bmp", "*.gif", "*.png"}
End If
End Sub
Please could someone tell me what am I doing wrong here
I am trying to set the image manager paths, in an editor, in a template column of a radgrid from code behind like this:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)
If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
Dim editor1 As RadEditor = e.Item.FindControl("Radeditor1")
Dim UserId As String
UserId = Membership.GetUser().ProviderUserKey.ToString()
editor1.ImageManager.ViewPaths = New String() {"~/images/users/" + UserId + "/uploads"}
editor1.ImageManager.DeletePaths = New String() {"~/images/users/" + UserId + "/uploads"}
editor1.ImageManager.UploadPaths = New String() {"~/images/users/" + UserId + "/uploads"}
editor1.ImageManager.EnableAsyncUpload = True
editor1.ImageManager.SearchPatterns = New String() {"*.jpeg", "*.jpg", "*.bmp", "*.gif", "*.png"}
End If
End Sub
Please could someone tell me what am I doing wrong here