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 Object, ByVal 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 |