"OnClientTextChange" event doesn't fire

3 posts, 0 answers
  1. Covertix
    Covertix avatar
    96 posts
    Member since:
    Aug 2008

    Posted 08 Jul 2012 Link to this post

    Hi,

    I have this code:
     

    <telerik:RadComboBox ID="rcbPageSize"

    runat="Server"

    skin="Gray"

    AllowCustomText="true"

    Style="float:right; margin-left: 5px;"

    Width="60px"

    OnClientTextChange = "PageSizeChanged"
    OnClientSelectedIndexChange =  "PageSizeChanged">

    <Items>

        <telerik:RadComboBoxItem runat="Server" Text="10" Value="10" />

        <telerik:RadComboBoxItem runat="Server" Text="20" Value="20" Selected="true" />

        <telerik:RadComboBoxItem runat="Server" Text="50" Value="50" />

        <telerik:RadComboBoxItem runat="Server" Text="150" Value="150" />

        <telerik:RadComboBoxItem runat="Server" Text="250" Value="250" />

    </Items>

    </telerik:RadComboBox>

     

    <telerik:RadCodeBlock ID="rcb" runat="server">

     <script type="text/javascript">

     

     

    function PageSizeChanged(sender, eventArgs) {

    alert("You typed " + sender.get_text());

    }

     

     

     

    </script>

    </telerik:RadCodeBlock>

     

     

     

     

    When I change the selection, the function "PageSizeChanged" is called, but when I change the text by typing inside the combobox, the function is never called.

    Do you have any idea why?

    Thanks for the help.

     

     

     

     

  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 08 Jul 2012 Link to this post

    Hello,

    Please check below code its working correctly from my side.

    <telerik:RadComboBox ID="rcbPageSize" runat="Server" AllowCustomText="true" Width="60px"
               OnClientTextChange="PageSizeChanged" OnClientSelectedIndexChanged="PageSizeChanged">
               <Items>
                   <telerik:RadComboBoxItem runat="Server" Text="10" Value="10" />
                   <telerik:RadComboBoxItem runat="Server" Text="20" Value="20" Selected="true" />
                   <telerik:RadComboBoxItem runat="Server" Text="50" Value="50" />
                   <telerik:RadComboBoxItem runat="Server" Text="150" Value="150" />
                   <telerik:RadComboBoxItem runat="Server" Text="250" Value="250" />
               </Items>
           </telerik:RadComboBox>


    -- text change

    --indexchanged


    Thanks,
    Jayesh Goyani
  3. Covertix
    Covertix avatar
    96 posts
    Member since:
    Aug 2008

    Posted 08 Jul 2012 Link to this post

    Hi Jayesh and thanks for your reply,
    Obviously in a "clean" environment it works for you, but for some reason the same code doesn't work here.
    You (as Telerik) should understand the control better than anyone else, so I think you can point out reasons why the event does not fire and I can check them out here.

    Just to see it works for you, doesn't help me to solve my problem :), as I said, I know it works in a clean environment.

    Thanks for your help.

    p.s.
    Notice I have Telerik.Web.UI 2008.2.826.35
Back to Top