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

RadCombobox firing SelectedIndexChanged on every postback on IE

15 Answers 390 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thiago
Top achievements
Rank 1
Thiago asked on 19 Mar 2013, 07:19 PM
Hi there, so, my problem is, I have a RadCombobox that's filled from the codebehind. But depending on what record is selected, it fires the SelectedIndexChanged on every postback.

After testing EVERY item from my Combobox, I found this:

My combo has these items:

  1. Foo
  2. Bar
  3. Foo Bar

If I select 'Foo Bar', I have this issue, and SelectedIndexChanged is fired everywhere.
This is because the space character that is comming from my database is the character 160(non-breaking space, \u00A0) and not the usual character 32. And according to this blog post(http://www.adamkoch.com/2009/07/25/white-space-and-character-160/), IE handles them diferently.
If after loading my items, I replace the 160 char for the 32, everything works just fine.

My question is: Did anybody have this problem? is this a bug? Am I doing something wrong?

15 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 22 Mar 2013, 04:30 PM
Hello Thiago,

Currently we are not aware of such issue. Could you provide us the implementation of your RadComboBox (statically populated) so we could observe the problem locally?


All the best,
Nencho
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.
0
Thiago
Top achievements
Rank 1
answered on 25 Mar 2013, 02:02 PM
Here's the combobox in the .aspx

<telerik:RadComboBox ID="RadComboBox1" Culture="pt-BR" runat="server" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" AutoPostBack="True" />



And here's it's code in the codebehind

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadComboBox1.Items.Add(new RadComboBoxItem("Foo","1"));
        RadComboBox1.Items.Add(new RadComboBoxItem("Bar", "2"));
        RadComboBox1.Items.Add(new RadComboBoxItem("Foo"+((char)160)+"Bar", "3"));
    }
}
 
protected void RadComboBox1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    //Do Something
}

When you select the third item and do a postback, it fires the SelectedIndexChanged event(it fires correctly on selection too)
0
Nencho
Telerik team
answered on 26 Mar 2013, 04:44 PM
Hello Thiago,

I have performed some tests, based on the provided snippet of code, but I am still unable to replicate the described behavior. Here is a video demonstrating it at my end. Would you correct me if I am doing anything wrong? Could you specify the version of our controls that you are using and the browsers under which the behavior occurs?

Greetings,
Nencho
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.
0
Thiago
Top achievements
Rank 1
answered on 26 Mar 2013, 04:57 PM
The problem ONLY occurs on Internet Explorer, i tried with IE8 and 10. 
0
Nencho
Telerik team
answered on 29 Mar 2013, 11:56 AM
Hello Thiago,

Unfortunately, I am still unable to replicate this behavior under both specified browsers. Here is a video demonstrating the tests. Could you please specify which version of our controls do you use?


Regards,
Nencho
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.
0
Thiago
Top achievements
Rank 1
answered on 01 Apr 2013, 11:57 AM
The version is 2012.3.1205.40
0
Nencho
Telerik team
answered on 03 Apr 2013, 10:39 AM
Hello Thiago,

I am still unable to replicate the issue with the specified version. I am sending you the sample project, which I have tested with. Could you please give it a try at your end and let me know if I had missed something?

Note : dll files are removed from the attachment.

Regards,
Nencho
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.
0
Thiago
Top achievements
Rank 1
answered on 11 Apr 2013, 12:31 PM
I don't know what to tell you, after you sent me this solution, i tried this code in:

A different project
The same project but without a master page
Tha same project WITH a master page
All of the above but in an user control

And in all of these tries, the problem didn't occour.
But when I try it in the user control that it's supposed  to be, this happens.


What I noticed is that, IE renders the <li> items like this:

<li>Foo&nbsp;Bar</li>
0
Nencho
Telerik team
answered on 16 Apr 2013, 10:35 AM
Hello Thiago,

I have tried to replicate the issue, placing the RadComboBox in a user control, but I am still unable to replicate the problematic behavior. I am sending you the modified sample. Would you give it a try at your end and let me know if I had missed something.

Kind regards,
Nencho
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.
0
Thiago
Top achievements
Rank 1
answered on 16 Apr 2013, 05:49 PM
That's what i'm trying to tell you.
I can't reproduce the error either, it happens only when I try it on the pages that the control is supposed to be, NOT in any other place that I can control and show you.

But here's something interesting: I tried the same thing with the RadDropDownList(the regular asp.net dropdownlist also works) control, and it worked.
0
Nencho
Telerik team
answered on 19 Apr 2013, 10:29 AM
Hello Thiago,

Would you try to create a new page in your application and implement the logic, used in the problematic one? If the issue still persist, I would like to ask you to provide us with a runnable sample, demonstrating the problem.

Greetings,
Nencho
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.
0
Gregor
Top achievements
Rank 1
answered on 28 Apr 2015, 06:43 AM
I had the same Problem. I found that in the selected value of my RadCombobox there was a linebreak after the value causing the fireing of the selectedindexchanged Event on every page Action...
0
Nencho
Telerik team
answered on 01 May 2015, 06:08 AM
Hello Gregor,

Could you elaborate a bit more on what exactly was causing the issue at your end. In addition, please provide us with the implementation of the RadComboBox that you use at your end and the underlying data source, which was used for replicating the issue.

Thus we would be able to replicate the issue locally and determine whether it is a bug.

Regards,
Nencho
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Gregor
Top achievements
Rank 1
answered on 04 May 2015, 05:48 AM

Hello,

I'm using RadControls for ASP.NET AJAX 2015.1 310.

In my case the selected Value of the RadComboBox has a linebreak-character (chr(10)+chr(13)) at the ent of the string. when the page did a postback, it also fires the selectedIndexChanged Event of the radcombobox before.

Kind Regards

Gregor

0
Nencho
Telerik team
answered on 15 May 2015, 08:46 AM
Hello Gregor,

I am afraid that the issue was not replicated locally, using the last provided information. This is why, I would like to ask you to submit a support ticket, along with a runnable sample attached, so we could inspect your proper implementation and pinpoint the issue.

Regards,
Nencho
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ComboBox
Asked by
Thiago
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Thiago
Top achievements
Rank 1
Gregor
Top achievements
Rank 1
Share this question
or