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

LightBox with Textbox

3 Answers 94 Views
LightBox
This is a migrated thread and some comments may be shown as answers.
DEBI
Top achievements
Rank 1
DEBI asked on 05 Nov 2013, 07:03 PM
I need some help on how to read textbox values inside the lightbox :

For example:
<telerik:RadLightBox ID="OpenVideoLightBox" runat="server" Width="780px" Height="730px"  CssClass="lb_feedback" Modal="true">
        <ClientSettings>
            <AnimationSettings HideAnimation="Resize" NextAnimation="Fade" PrevAnimation="Fade" ShowAnimation="Resize" />
        </ClientSettings>
        <Items>
            <telerik:RadLightBoxItem>
                <ItemTemplate>                    
                    <asp:TextBox ID="FromEmail" runat="server" Font-Size="Small" Width="550px" Height="30px" />
                </ItemTemplate>
            </telerik:RadLightBoxItem>
        </Items>
    </telerik:RadLightBox>

I am not able to read the textbox value from codebehind, how can i accomplish that?

3 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 08 Nov 2013, 02:31 PM
Hello Debi,

As far as I can see you have enabled the modality of the LightBox. Could you please elaborate on which event you are trying to access the LigthBox values. Basically you have to find the LightBox control and in one of its item you could call FindControl() method to access the control.

Regards,
Kostadin
Telerik
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 the blog feed now.
0
Frank
Top achievements
Rank 1
answered on 20 Dec 2013, 07:05 PM
I used the sender.findcontrol("txtCompany").text in the "Command" event of the lightbox, but it seems the "items" in the itemtemplate already got reloaded and returned "" (empty string).

So in what event can I get the value of the text box before it gets "destroyed"?

And just let you know what I am trying to do with the LightBox control, I am trying to use it for "wizard" screen where you can have Step 1, Step 2 and blah. 

So  I have 3 itemtemplate items in the Lightbox control.  

1. in the first page, it has some general information, e.g. first name, last name, etc.  They are radtextbox control.

2. When user hit the "next" button, in the "command" event, I tried to read the value of textbox, I get "" (empty string value).  

So where and how can I read those value?

Thx

0
Frank
Top achievements
Rank 1
answered on 23 Dec 2013, 03:16 PM
Nevermind, didn't see the property PreserveCurrentItemTemplates...
Tags
LightBox
Asked by
DEBI
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Frank
Top achievements
Rank 1
Share this question
or