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

need help in file explorer control

5 Answers 72 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Armend
Top achievements
Rank 1
Armend asked on 20 Jan 2012, 12:17 AM
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

5 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 20 Jan 2012, 09:08 PM
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!
0
Armend
Top achievements
Rank 1
answered on 21 Jan 2012, 12:55 AM
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
0
Armend
Top achievements
Rank 1
answered on 22 Jan 2012, 04:11 AM
HEY THIS IS NOT DONE YET PLS HELP
0
Dobromir
Telerik team
answered on 24 Jan 2012, 04:42 PM
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
0
Armend
Top achievements
Rank 1
answered on 25 Jan 2012, 08:37 PM
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
Tags
FileExplorer
Asked by
Armend
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Armend
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or