Wow I am really posting alot of problems lately :(
I have tried both ASP:FileUpload and RadUpload for this and still the same problem.
I have a FileUpload inside EditItemTemplate.
What I need to do is access this control and find the filename, FileBytes(), FileSize etc. upon inserting.
After reading http://www.telerik.com/help/aspnet-ajax/grdinsertupdatedeleteatdatabaselevel.html, I have attempted to access the control via:
Unfortunately, although I can read the other column controls that are textboxes, I am unable to ready any data from the fileUpload control. :(
I have tried both ASP:FileUpload and RadUpload for this and still the same problem.
I have a FileUpload inside EditItemTemplate.
What I need to do is access this control and find the filename, FileBytes(), FileSize etc. upon inserting.
After reading http://www.telerik.com/help/aspnet-ajax/grdinsertupdatedeleteatdatabaselevel.html, I have attempted to access the control via:
Unfortunately, although I can read the other column controls that are textboxes, I am unable to ready any data from the fileUpload control. :(
ASPX:
| <telerik:GridTemplateColumn HeaderText="File" UniqueName="TemplateColumn"> |
| <EditItemTemplate> |
| <%-- <telerik:RadUpload ID="ruFile" runat="server" ControlObjectsVisibility="None" MaxFileInputsCount="1"> |
| </telerik:RadUpload>--%> |
| <asp:FileUpload ID="ruFile" runat="server" /> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
VB:
| Private Sub rgResource_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgResource.InsertCommand |
| Dim insertedItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem) |
| Dim fileup As FileUpload = TryCast(insertedItem("TemplateColumn").Controls(1), FileUpload) |
| End Sub |