upgraded, jquery can't find textboxes

3 posts, 0 answers
  1. Elliott
    Elliott avatar
    391 posts
    Member since:
    May 2010

    Posted 29 Dec 2011 Link to this post

    I upgraded a working site in development to 2011.3.1115.35 and .NET 3.5
    code that used to work is now broken
        <telerik:RadAjaxManager ID="raManager" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgItems">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgItems" LoadingPanelID="rapItems" />
                        <telerik:AjaxUpdatedControl ControlID="rntbPage" />
                        <telerik:AjaxUpdatedControl ControlID="rntbOrderCode" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rgOrder">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgOrder" LoadingPanelID="rapOrder" />
                        <telerik:AjaxUpdatedControl ControlID="rntbPage" />
                        <telerik:AjaxUpdatedControl ControlID="lblInfo" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>  
     
    ...
            <telerik:RadAjaxPanel id="rapItems" UpdateMode="Conditional" runat="server" >
     <!--   <ContentTemplate> -->
            <table border="0" cellpadding="1" cellspacing="1" style="width: 1015px" >
            <tr>
            <td>
                <asp:Label ID="lblTrace" runat="server" />
            </td>
            <td>
                <table cellpadding="0" cellspacing="0">
                <tr>
                <td>
                    <telerik:RadNumericTextBox ID="rntbOrderCode" MinValue="1" MaxValue="99999" MaxLength="5" Font-Names="Verdana" Font-Size="X-Small" Height="12px" Width="54px" runat="server">
                        <NumberFormat DecimalDigits="0" GroupSeparator="" />
                        <ClientEvents OnKeyPress="OnKeyPress" />
                    </telerik:RadNumericTextBox>
                </td>
                <td>
                    <telerik:RadButton ID="rbOrderCode" Text="Order Code" OnClick="rbOrderCode_Click" Skin="Hay" AccessKey="F" ToolTip="Alt + F" runat="server" >
                        <Icon SecondaryIconCssClass="rbSearch" SecondaryIconRight="4" SecondaryIconTop="4" />
                    </telerik:RadButton>
                </td>
                </tr>
                </table>
            </td>
            <td>
                <table cellpadding="0" cellspacing="0">
                <tr>
                <td>
                    <telerik:RadNumericTextBox ID="rntbPage" MinValue="1" MaxValue="999" MaxLength="3" Font-Names="Verdana" Font-Size="X-Small" Height="12px" Width="54px" runat="server" >
                        <NumberFormat DecimalDigits="0" GroupSeparator="" />
                        <ClientEvents OnKeyPress="OnKeyPress" />               
                    </telerik:RadNumericTextBox>
                </td>
                <td>
                    <telerik:RadButton ID="rbPage" Text="Page #" OnClick="rbPage_Click" Skin="Hay" AccessKey="P" ToolTip="Alt + P" runat="server">
                        <Icon SecondaryIconCssClass="rbSearch" SecondaryIconRight="4" SecondaryIconTop="4" />
                    </telerik:RadButton>
                </td>
                </tr>
                </table>
            </td>
    ....
            function ItemsRowSelected(sender, eventArgs) {
                var theGrid = sender.get_masterTableView();
                var k = eventArgs.get_itemIndexHierarchical();
                var row = theGrid.get_dataItems()[k];
                var rntbPage = $find('<%= rntbPage.ClientID %>');     --- no longer works
                var rntbOrderCode = $find('<%= rntbOrderCode.ClientID %>'); -- no longer works
     
    ...
            function OrdersRowSelected(sender, eventArgs) {
                var theGrid = sender.get_masterTableView();          
                var j = eventArgs.get_itemIndexHierarchical();
                var rntbPage = $find('<%=rntbPage.ClientID %>'); -- this doesn't work either
     
     
     
        <telerik:RadGrid ID="rgItems" OnNeedDataSource="rgItems_NeedDataSource" OnItemDataBound="rgItems_ItemDataBound" Skin="Hay" width="1014px" runat="server" >
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView DataKeyNames="ItemID" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="false" AllowFilteringByColumn="False" EditMode="InPlace" Width="99%" >
            <Columns>
      ...

    could someone tell me why I can't access my RadNumericTextBoxes from jquery any more?
  2. Tsvetina
    Admin
    Tsvetina avatar
    1873 posts

    Posted 30 Dec 2011 Link to this post

    Hi Marianne,

    Our system indicates the you have also submitted a support ticket on this issue and my colleague just answered it. Please, take a look at it and if you have any questions or concerns, please post there, so that we avoid duplicate posts.

    All the best,
    Tsvetina
    the Telerik team
    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 their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 08 May 2013 Link to this post

    ------------------------------------------------------------------------------------------
    Setup :
    ------------------------------------------------------------------------------------------
    telerik : 

    File Type : Assembly
    Identity  : Telerik.Web.UI
    Resolved : True
    Runtime Version : v4.0.30319
    Specific Version : False
    Strong Name : True
    Version : 2013.1.403.40

    jQuery : jquery-1.5.2.min.js
    jQuery-UI:  jquery-ui-1.8.11.custom.min.js

    OS : W7 Pro
    Browser :  IE 9.0.8112.16421 (Update Version 9.0.15)

    ASP.NET 4.0

    ------------------------------------------------------------------------------------------


    I am using $(':input') and that finds all asp.net and html controls on the page and if user changes the text manually from radDate/Time Picker or Rad Combobox, those are being taken in account too, but there does not seem to be any natural behaviour to find all rad Controls at once.

    Also I can not find them by class name (though this is not a desired way I want but I can not get it even by using dirty ways)

    I tried following w/o success :

    $telerik.$('RadComboBox') / $telerik.$('.RadComboBox')

    document.getElementsByClassName('RadComboBox');
    document.querySelectorAll(('RadComboBox RadComboBox_Default');
    document.body.querySelectorAll('RadComboBox RadComboBox_Default');

    $("div > RadComboBox")
    $telerik.getChildrenByClassName('RadComboBox')
    $telerik.getChildByClassName('RadComboBox')

    EDIT
    --------------------
    Requirement : Add event handler for any 'change' event, all radComboBoxes, AllRadDatePickers etc ... now $(':input') do perform what I am expecting if I puch-in hte values using keyboard, but that does not seem to be happening if I use mouse and select values.

    Additionally, I certainly can't specify OnClientChanged hard coded on client side, there may / may not be existing functions (inpu validator) associated + ... I am also having a dynamic JavaScript being bound to detect changes. (this javscript is application wide used)

    Now I need to add a functionality to prompt the user when he/she tries to perform data entry when certain flag on server is on. In that case I inject some javascript from code behind ...

    ... all this works till the above point for all controls, but Rad Controls some how need more attention to accomplish the task above.
    --------------------

    Please help ...

Back to Top