internet-explorerteleriktelerik-combobox

RadCombobox firing SelectedIndexChanged on every postback on IE


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?


Solution

  • I had the same problem. My workaround was check the OldValue and Value in the SelectedIndexChanged event:

     protected void dd_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            if (e.OldValue != e.Value)
            {
                //value changed
            }
        }