Pass filePath to radgrid modal edit template

3 posts, 0 answers
  1. Ric
    Ric avatar
    5 posts
    Member since:
    Aug 2013

    Posted 08 Jul 2014 Link to this post


    I have a radGrid which includes an "Add New" form. This form is set as a modal popup form and includes a file selector set up exact like this demo:

    My problem comes with trying to get the filePath back to the textbox in the radgrid form template. Currently when I double click a file nothing happens. The file explorer does not close and I do not get the file path populating my textbox. All of my code is identical to the above demo except for the fact that the file explorer dialog and filepath textbox reside within a radgrid editform template.

    Any advice/insight is greatly appreciated!

  2. Ric
    Ric avatar
    5 posts
    Member since:
    Aug 2013

    Posted 08 Jul 2014 in reply to Ric Link to this post

    To add more info,

    I think the problem lies in referencing the textbox in Javascript. Here is the code that seems to be holding up the process:

                                                     function OnFileSelected(fileSelected) {
                                                     var grid = document.getElementById("<%=gridDocs.ClientID%>"); 
                                                         var textbox = grid.getElementsByTagName("txtFilePath");

    The error is raised on the "set_value".

  3. Vessy
    Vessy avatar
    1637 posts

    Posted 10 Jul 2014 Link to this post

    Hi Ric,

    I assume that the "txtFilePath" is an Id of an element, but not a tag name as refered in the provided by you code snippet. The getElementsByTagName function returns a list of elements with the given tag - please refer this MDN article for more detailed information.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top