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

Rad upload on RadGrid Edit Popup

3 Answers 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
raju
Top achievements
Rank 1
raju asked on 01 Jul 2010, 01:40 AM
Hi Guys,
                            I have another issue. Please help me....
Here is my issue. i have RadGrid which has Edit Pop up . And I have RadUPload in the RadGrid on Form Template. When i was trying to save this pdf files on server on click update event. ITs not getting or finding those files.............


Please any help.....
Thanks,Jaru

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 06 Jul 2010, 10:34 AM
Hello Jaru,

Do you use AJAX? If so, please note that can not upload files in AJAX request. Please examine the following link for more information.
Uploading Files with AJAX

Kind regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris Olsen
Top achievements
Rank 1
answered on 03 Feb 2011, 12:08 AM
I have the same question.

I have a radgrid  that has an edit for popup mode.  How can I access the radupload to get the file and upload it?

Thanks,Chris

<telerik:RadGrid ID="RadGrid2" AutoGenerateEditColumn="true" runat="server" AllowAutomaticDeletes="True"
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True"
        AllowMultiRowEdit="false" DataSourceID="ObjectDataSource1"
        AllowSorting="true">
        <MasterTableView EditMode="PopUp" CommandItemDisplay="Top" DataKeyNames="NewsId">
           <EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit News Item: {0}"
                CaptionDataField="NewsId" EditFormType="Template" PopUpSettings-Modal="false" PopUpSettings-Width="750" >
                <FormTemplate>
                    <table id="Table1" cellspacing="1" cellpadding="1" border="0">
                         
                        <tr>
                            <td>
                                Title:
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox10" Text='<%# Bind( "NewsTitle") %>' runat="server">
                                </asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                Article:
                            </td>
                             </tr>
                        <tr>
                            <td colspan="2">
                               <telerik:RadEditor runat="server" ID="txtContents" BackColor="White"  Content='<%# Bind("NewsArticle") %>'
                               >
                                <ImageManager UploadPaths="~/uploads" />
                            </telerik:RadEditor>
                            <br />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Link:
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox12" Text='<%# Bind("NewsLink") %>' runat="server">
                                </asp:TextBox>
                                <br />
                                 <telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="1"
                                 ControlObjectsVisibility="None" TargetFolder="~/uploads" /> 
                            </td>
                        </tr>
                    </table>
                    <table style="width: 100%">
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button
                                <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
  
        </MasterTableView>
        <ClientSettings>
        </ClientSettings>
    </telerik:RadGrid>
0
Shinu
Top achievements
Rank 2
answered on 03 Feb 2011, 05:11 AM
Hello Chris,

You can try the following code snippet to access the RadUpload in the ItemDataBound event.
C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
   {
         if (e.Item is GridEditFormItem && e.Item.IsInEditMode)//popup&editform
       {
           GridEditFormItem edititem = (GridEditFormItem)e.Item;
           RadUpload RadUpload1 = (RadUpload)edititem.FindControl("RadUpload1");
           
       }
   }

Thanks,
Shinu.
Tags
Grid
Asked by
raju
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Chris Olsen
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or