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

Set radtextbox value in itemtemplate

0 Answers 58 Views
LightBox
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 11 Jan 2018, 11:23 PM

So I saw one of the old thread by Princy:

 

https://www.telerik.com/forums/find-control-within-itemtemplate-client-side

 

I tried that in my lightbox but it seems is not setting the value of the textbox in the itemtemplate of the lightbox, why ?

 

        function OpenLB() {
            var lightBox = $find('<%= LBoxEdit.ClientID %>');
            lightBox.show();
            var Text = lightBox.get_element().getElementsByClassName("rltbDescriptionBox");
            Text.LBoxEdit$txtDescripton.control.set_value("new value");
        }

 

 

            <telerik:RadLightBoxItem>
                <ItemTemplate>
                    <table style="padding: 20px; font-family: Arial">
                        <tr>
                            <td style="font-family: Arial, Helvetica, sans-serif; font-size: 18px; padding-bottom: 10px;">
                                Description
                            </td>
                        </tr>
                        <tr>
                            <td style="padding: 10px 0px 10px 20px">
                                <telerik:RadTextBox ID="txtDescripton" runat="server" CssClass="rltbDescriptionBox" Font-Size="16px" Width="400px" Height="30px">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding: 10px 0px 10px 20px">
                                <telerik:RadButton RenderMode="Lightweight" ID="btnFormSave" Height="30px"
                                    Text="Save" Font-Size="16px" Font-Bold="True" runat="server" Skin="Silk"></telerik:RadButton>
                            </td>
                        </tr>
                    </table>                    
                </ItemTemplate>
            </telerik:RadLightBoxItem>

No answers yet. Maybe you can help?

Tags
LightBox
Asked by
Frank
Top achievements
Rank 1
Share this question
or