This is a migrated thread and some comments may be shown as answers.

get UploadedFileContent from codebehind

1 Answer 101 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
armando
Top achievements
Rank 1
armando asked on 29 Oct 2009, 02:11 AM
Hi, I'm working with a grid and when I go  in the updateCommand  procedure, I try to get the uploadFileContent, but alwasy is null, some one can help me? I have this code.
 Protected Sub gridGaleria_UpdateCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles gridGaleria.UpdateCommand 
        If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then 
 
            Dim editItem As GridEditableItem = DirectCast(e.Item, GridEditableItem) 
            Dim upload As GridBinaryImageColumnEditor = DirectCast(editItem.EditManager.GetColumnEditor("Upload"), GridBinaryImageColumnEditor) 
            Dim db As New aulaDataContext 
            If upload.UploadedFileContent.Count > 0 Then 
                Dim evenFoto = From ev In db.eventosFotos _ 
                           Where ev.idEventoFoto = 1 _ 
                           Select ev 
                For Each renglon In evenFoto 
                    renglon.pathArchivo =     upload.RadUploadControl.UploadedFiles.Item(0).FileName 
                    db.SubmitChanges() 
                Next 
 
            End If 
        End If 
    End Sub 

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 29 Oct 2009, 11:09 AM

Hello armando,

In case you ajaxified your grid via RadAjaxManager or RadAjaxPanel, can you please verify that you disable the ajax explicitly as illustrates on this online demo of the product? Thus the UploadedFileContent property should contain the necessary data.

Best regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
BinaryImage
Asked by
armando
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or