Hi,
I am facing issue to get uploaded file from FileUpload control embeded in a popup dialog box. This popup is rendered using EditFormSettings
for RadGrid.
My RadGrid look like this:
DocumentList.aspx
UploadDocument.ascx
When I hit Upload button, page is properly postback but I unable to get uploaded file in buttonUpload_Click event of the button. fileUploadDocument.PostedFile property is showing null in this event.
Please advice.
Thanks very much in advance for your help.
I am facing issue to get uploaded file from FileUpload control embeded in a popup dialog box. This popup is rendered using EditFormSettings
for RadGrid.
My RadGrid look like this:
DocumentList.aspx
<telerik:RadGrid ID="RadGridDocuments" runat="server" Visible="true" Skin="Simple" EnableEmbeddedSkins="false" CssClass="CustomGrid" OnInsertCommand="RadGridDocuments_InsertCommand"> <MasterTableView CommandItemDisplay="Top" DataKeyNames="DocumentId" EditMode="PopUp"> <CommandItemTemplate> <table class="rgCommandTable" style="width: 100%;" cellpadding="0" cellspacing="0" border="0" id="customGridHeader"> <tr> <td align="right" class="block-title"> <asp:Button runat="server" ID="buttonAddNewRecord" CommandName="InitInsert" CssClass="rgAdd" Text=" " Visible="true" /> <asp:LinkButton runat="server" ID="linkbuttionInitInsert" CommandName="InitInsert" CommandArgument="TestPlan" Text="Upload Document" Visible="true"></asp:LinkButton> </td> </tr> </table> </CommandItemTemplate> <Columns> <telerik:GridBoundColumn UniqueName="DocumentName" HeaderText="Document Name" DataField="DocumentName" ItemStyle-Width="350px"></telerik:GridBoundColumn> <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" Text="Delete" ConfirmDialogType="Classic" ConfirmText="Are you sure you want to delete this document?" ItemStyle-Width="10px" ItemStyle-CssClass="rgAction"></telerik:GridButtonColumn> </Columns> <EditFormSettings InsertCaption="Upload Document" EditFormType="WebUserControl" PopUpSettings-Modal="true" UserControlName = "~/UserControls/UploadDocument.ascx"> <FormTemplate> </FormTemplate> </EditFormSettings> </MasterTableView> <ClientSettings> <ClientEvents OnPopUpShowing="PopUpShowing" /> </ClientSettings> </telerik:RadGrid>UploadDocument.ascx
<asp:FileUpload runat="server" ID="fileUploadDocument" Width="220px" /><asp:Button ID="buttonUpload" Text="Upload" runat="server" CausesValidation="true" CommandName="Upload" Width="80px" onclick="buttonUpload_Click"></asp:Button>When I hit Upload button, page is properly postback but I unable to get uploaded file in buttonUpload_Click event of the button. fileUploadDocument.PostedFile property is showing null in this event.
Please advice.
Thanks very much in advance for your help.