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

Find editformsettings controls through javascript

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 18 Nov 2010, 09:39 PM
Hi,

I have a radgrid which uses a modal popup window to insert new items as shown below. Does anyone know how I can find the textbox value through javascript?

<EditFormSettings InsertCaption="Add Note" CaptionFormatString="View Note" EditFormType="Template">
           <PopUpSettings Modal="true" />
           <FormTemplate>
               <table id="tblAddNote" cellspacing="1" cellpadding="1" width="250px" border="0">
                   <tr>
                       <td>
                           <asp:TextBox ReadOnly='<%# !(Container is GridEditFormInsertItem) %>' Width="400px" Height="150px" TextMode="MultiLine" ID="txtNote" Text='<%# Bind( "Content") %>' runat="server">
                           </asp:TextBox>
                       </td>
                   </tr>
               </table>
               <table style="width: 100%">
                   <tr>
                       <td align="right" colspan="2">
                           <asp:Button ID="btnUpdate"  Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Close" %>'
                               runat="server"  CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Cancel" %>'>
                           </asp:Button
                           <asp:Button ID="btnCancel" Visible="<%# (Container is GridEditFormInsertItem) %>" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                           </asp:Button>
                       </td>
                   </tr>
               </table>
           </FormTemplate>
       </EditFormSettings>

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 23 Nov 2010, 03:48 PM
Hello John,

The easiest way is to use our static methods findControl and findElement. For more information please examine the following link:
Telerik static client library

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or