need help in file explorer control

6 posts, 0 answers
  1. Armend
    Armend avatar
    4 posts
    Member since:
    May 2007

    Posted 19 Jan 2012 Link to this post

    HI TO ALL
    I wanna use File Explorer control in asp.net web form smilar like given in example "File Selector Dialog" but in my case i am using a textbox control located inside Formview1 control and i need some help to modify following code to find my textbox control inside formview1. the code is like below:
    //This function is called from a code declared on the Explorer.aspx page function
    OnFileSelected(fileSelected) {
    var textbox = $find("<%= fileName.ClientID %>");
    textbox
    .set_value(fileSelected); }

    So how do i modify this script ?

    thanx in Advance
    rgds Armend
  2. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 20 Jan 2012 Link to this post

    Armend:

    If I understand you correctly, you're using the asp:FormView and your textbox is nested inside it, correct? I'd really need to see your .aspx code to determine the levels of nesting for the textbox.

    A possible solution that uses the .FindControl method is available at http://stackoverflow.com/questions/1353511/get-object-from-formview-with-javascript.

    Hope this helps!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Armend
    Armend avatar
    4 posts
    Member since:
    May 2007

    Posted 20 Jan 2012 Link to this post

    Yes sir, you are right,
    I am using as follow:
    1. <asp:updatepanel ID="updatepanel1"...>
    2. <asp:formview ID="Formview1" defaultmode="ReadOnly" ...>
            <ItemTemplate>...</ItemTemplate>
            <EditItemTemplate>
    3.<telerik:RadTextBox ID="PicturlTextBox" runat="server" Text='<%# Bind("Picturl") %>'/>
         </EditItemTemplate>
        ...and so on.
    I did lots of research by how to modyfy a code smilar with the link you provided to me but i think the problem is that I placed the control inside editmode and the default mode of formview is readonly.

    By the way here is the link of my example http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/client-sideapi/fileselectordialog/defaultvb.aspx

    So how do I code this pls?????????????????????????????????????????????????????


    many thanks
    Armend Derguti
  5. Armend
    Armend avatar
    4 posts
    Member since:
    May 2007

    Posted 21 Jan 2012 Link to this post

    HEY THIS IS NOT DONE YET PLS HELP
  6. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 24 Jan 2012 Link to this post

    Hi Armend,

    As explained the the link posted by Richard, the FormView control only renders the controls from the current View, thus if the FormView is in readonly mode the controls from the EditItemTemplate are not added to the page at all, and it is not possible to access them.

    Could you please describe in more details what exactly you are trying to achieve so we can try to provide possible solution?

    Regards,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  7. Armend
    Armend avatar
    4 posts
    Member since:
    May 2007

    Posted 25 Jan 2012 Link to this post

    HI DOBROMIR,

    First of all thanks for your commitment, so I have a formview control which bind a PictureURL, and simply I wanna offer to the user a very convenient way to select the picture in behalf of typing the link that he will never know the path cause the picture files are already uploaded just to select.
    If the way i try is almost imposable please sugest me something else. I already tried combobox as well but could not make it work insight formview. This is important to me as I am sure I will need in a future too!

    RGDS
    Armend Derguti
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017