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

want to find textbox using javascript

3 Answers 178 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 05 Jan 2011, 10:32 AM
 in my radgrid i hv one template column want to find following text box .. How to find in JAVASCRIPT

 <telerik:GridTemplateColumn DataField="GameUPC" HeaderText="UPC" SortExpression="GameUPC"
                                    HeaderStyle-HorizontalAlign="Center" FilterListOptions="AllowAllFilters" AutoPostBackOnFilter="True"
                                    ShowFilterIcon="false" CurrentFilterFunction="Contains" UniqueName="GameUPC">
                                    <ItemTemplate>
                                        <asp:Label ID="lblGameUPC" runat="server" Text='<%#Eval("GameUPC")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtGameUPC" onkeydown="return isNumeric(event.keyCode);" Enabled="true"
                                            MaxLength="12" TabIndex="4" runat="server" Text='<%#Eval("GameUPC")%>'></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="reqFieldValGameUPC" runat="server" ErrorMessage="RequiredFieldValidator"
                                           ControlToValidate="txtGameUPC" Text="Please enter Game UPC code."></asp:RequiredFieldValidator>
                                           <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txtGameUPC"
                                            ErrorMessage="Invalid UPC." ClientValidationFunction="validateUPC">
                                        </asp:CustomValidator>
                                    </EditItemTemplate>


URGENT
                                    
                                </telerik:GridTemplateColumn>

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 05 Jan 2011, 10:50 AM
Hello Rahul,

You can use the findElement and findControl methods from our static client library.

Let me know if you need more information.

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start 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.
0
Rahul
Top achievements
Rank 1
answered on 05 Jan 2011, 11:32 AM
var masterTable = $find("<%=grdGameInfo.ClientID%>").get_masterTableView();
        var tGameUPC = masterTable.get_dataItems()[0].findControl('txtGameUPC');

this my javascript code .. Not find it's return null .. tell me how to find editform element textbox inside the radgrid
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Jan 2011, 12:16 PM
Hello Rahul,

Please refer the following code library  which provides an example of how to retrieve editor values on client:
Retrieving grid editor value client side

Thanks,
Princy.
Tags
Grid
Asked by
Rahul
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Rahul
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or