Hello,
I am using RadComboBox with EnableLoadOnDemand property set to "True". I am handling ItemsRequested event to add appropriate items in combo box.
The problem is that if item's text contains more than one space between words, spaces are removed. For example, if item contains "Test Test" text (note 2 spaces between the words), RadComboBox.Text property returns "Test Test" text (1 space). I was able to reproduce this problem in IE 7.0 and Safari 3.1.2 for Windows. FF 3.0 works fine (it returns all spaces).
Please check my code. Select "Test Test2" item and check how many spaces will be returned (I replace spaces with '.').
Best regards, Oleg.
My configuration
Telerik For ASP.NET AJAX 2008.01.0619.35
Windows XP Pro SP2
Visual Studio 2008
IE 7.0 - Fails
Safari 3.1.2 for Windows - Fails
FF 3.0 - OK
Default.aspx
Default.aspx.cs
I am using RadComboBox with EnableLoadOnDemand property set to "True". I am handling ItemsRequested event to add appropriate items in combo box.
The problem is that if item's text contains more than one space between words, spaces are removed. For example, if item contains "Test Test" text (note 2 spaces between the words), RadComboBox.Text property returns "Test Test" text (1 space). I was able to reproduce this problem in IE 7.0 and Safari 3.1.2 for Windows. FF 3.0 works fine (it returns all spaces).
Please check my code. Select "Test Test2" item and check how many spaces will be returned (I replace spaces with '.').
Best regards, Oleg.
My configuration
Telerik For ASP.NET AJAX 2008.01.0619.35
Windows XP Pro SP2
Visual Studio 2008
IE 7.0 - Fails
Safari 3.1.2 for Windows - Fails
FF 3.0 - OK
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server">
</telerik:RadScriptManager>
<telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="True">
</telerik:RadComboBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
</form>
</body>
</html>
Default.aspx.cs
using System;
using Telerik.Web.UI;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
RadComboBox1.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(RadComboBox1_ItemsRequested);
}
void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
RadComboBox comboBox = (RadComboBox)sender;
comboBox.Items.Add(new RadComboBoxItem("Test"));
comboBox.Items.Add(new RadComboBoxItem("Test Test"));
comboBox.Items.Add(new RadComboBoxItem("Test Test2")); // note: 2 spaces
e.EndOfItems = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = RadComboBox1.Text.Replace(" ", ".");
}
}