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

"OnClientTextChange" event doesn't fire

2 Answers 135 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Covertix
Top achievements
Rank 1
Covertix asked on 08 Jul 2012, 12:54 PM
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 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 08 Jul 2012, 04:30 PM
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
0
Covertix
Top achievements
Rank 1
answered on 08 Jul 2012, 08:35 PM
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
Tags
ComboBox
Asked by
Covertix
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Covertix
Top achievements
Rank 1
Share this question
or