RadGrid/Attachment Functionality in Template?

2 posts, 0 answers
  1. Ralph
    Ralph avatar
    1 posts
    Member since:
    Dec 2013

    Posted 31 Jul 2015 Link to this post

    Hi All

    Hopefully I'm explaining this clearly ... I'm pretty new to using the rad controls and any help would be appreciated.

    I'm trying to find a way of allowing an attachment/file to a new record within a RadGrid that get's uploaded along with the Insert/Update command but I can't seem to figure out a solution. I initially tried using asp:FileUpload but quickly realized that it requires a postback. When I get the FileUpload object (since a postback has not occured) the the control has HasFile returns false even though I "attached" a file.

    I also tried using the Rad but keep getting the same results.

    Regards

    Ralph

     

  2. Eyup
    Admin
    Eyup avatar
    3690 posts

    Posted 05 Aug 2015 Link to this post

    Hello Ralph,

    You can directly use a GridAttachmentColumn to upload/download files via your grid:
    http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-types/defaultcs.aspx

    Alternatively, you can use a GridTemplateColumn and place a RadAsyncUpload control in its EditItemTemplate container:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/column-types#template

    You can also check the following section for accessing the control on code-behind:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-in-editinsert-mode

    Hope this helps.

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top