RadGrid WebuserControl Find RadNumericTextBox

2 posts, 0 answers
  1. John
    John avatar
    5 posts
    Member since:
    Aug 2015

    Posted 11 Oct 2019 Link to this post

    I have a Radgrid that when the EditCommandColumn button is clicked I load a WebUserControl.

                                                                           <EditFormSettings  UserControlName="BudgetItemControl.ascx" EditFormType="WebUserControl">
                                                                                <EditColumn UniqueName="EditCommandColumn1">
                                                                                <PopUpSettings Modal="false" />


    On the WebUserControlI have the following bound field...

                                <telerik:RadNumericTextBox ID="txtQty" runat="server"  Text='<%# DataBinder.Eval(Container, "DataItem.Qty") %>' DisabledStyle-                 

                                    EmptyMessage="Enter qty" Enabled="true" Font-Names="Arial" Font-Size="Small" ForeColor="#666699" MinValue="0"

                                    Skin="Silk" TabIndex="7" Type="Number" Value="0" Width="190px" Visible="true"
                                    onkeyup="javascript: onChange();" onkeypress="return isFloatNumber(this,event);" >

    On the form with the grid I have the javascript OnChange() event

    when I try to get_value

    var txt=$find("<%= RadGrid1.ClientID%>").get_masterTableView().get_dataItems()[1].findControl("txtqty")

    I receive the following error: Cannot read property 'findControl' of undefined.

    I can get the value when using an asp control.

    var txt1 = document.getElementById("TextBox2").value; (THIS WORKS)

    How can I get the RadNumericTextBox value?






  2. Eyup
    Eyup avatar
    3953 posts

    Posted 16 Oct 2019 Link to this post

    Hi John,


    To achieve this requirement, you can use the get_editItems() method instead of get_dataItems(). Then, you can use the $telerik.findControl() method by passing the get_editItems()[0].get_editFormItem() contaoner as the first argument:

    You can find a similar implementation using these methods here:

    I hope this will prove helpful. Feel free to give it a try and let me know about the result.


    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top