Just a upload facility in radgrid

Thread is closed for posting
2 posts, 0 answers
  1. Manoj
    Manoj avatar
    12 posts
    Member since:
    Aug 2010

    Posted 29 Aug 2010 Link to this post

    Hi Friends,
    I am using radgrid, i just want to give a user option to upload the file at server side, i went through all the demos of that upload control
    but i don't want to give a option of editing the record to user, user will just click at browse button of upload control in row and he will select the file which he wants to upload (No editing of records just a upload of file for that particular row).
    so how should i go through this please let me know.

    Thanks in advance.
    Manoj Gupta

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Aug 2010 Link to this post

    Hello Manoj,


    Add RadUpload control in ItemTemplate section of GridTemplateColumn in order to show upload in grid browser mode. The following code will help you in accessing RadUpload in "Upload" button_click event.

    Code behind:
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "Upload")
        {
            GridDataItem item = (GridDataItem)e.Item;
            RadUpload radupload = (RadUpload)item.FindControl("RadUpload1");
        }
    }


    Where the ASPX I used is:
            . . .
        <telerik:GridTemplateColumn>
             <ItemTemplate>              
                 <telerik:RadUpload ID="RadUpload1" runat="server" ControlObjectsVisibility="All">
                 </telerik:RadUpload>
                 <asp:Button ID="Button2" runat="server" Text="Upload" CommandName="Upload" />
             </ItemTemplate>
         </telerik:GridTemplateColumn>
     </Columns>
    . . .

    Hope this helps.

    Regards,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top