Mar 10, 2011, 1:01 PM
[CLOSED] Trailing spaces in Ext.Net.ListItems for Combos causes unexpected behaviour...?
Run this, you'll see that because there are trailing spaces in the names and values of the list items used in the multicombo it stops working and does not let you check any of the items!
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ext_forum_mCombo.aspx.cs" Inherits="OSyS.Kms._Ext._temp_.ext_forum_mCombo" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!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">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
this.multiComboCause.SelectedItems.Clear();
this.multiComboCause.Items.Add(new Ext.Net.ListItem("test1 ", "test1 123 123 "));
this.multiComboCause.Items.Add(new Ext.Net.ListItem("test2 ", "test2 123 123 "));
this.multiComboCause.Items.Add(new Ext.Net.ListItem("test3 ", "test3 123 123 "));
this.multiComboCause.UpdateSelection();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="extResourceManager" runat="server" />
<ext:Panel ID="Panel2" runat="server" Layout="fit">
<Items>
<ext:MultiCombo ID="multiComboCause" runat="server" Width="260" SelectionMode="All" AnchorHorizontal="100%" FieldLabel="Cause">
</ext:MultiCombo>
</Items>
</ext:Panel>
</form>
</body>
</html>
Last edited by Daniil; Mar 15, 2011 at 7:46 AM.
Reason: [CLOSED]