Webcombo Display Bug while using Multiselection

6 replies. Last post: November 15, 2010 2:46 AM by Andi Santoso
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hi,


We've encountered a Bug in the WebCombo Control, which only occurs with the latest updates.

The WebCombo is created at runtime in the Page_Load event and has multiselection enabled.


This worked, but after updating to Intersoft R2 SP1 it didn’t.


If you click on an item, it shows displays “Item1~”.

After you deselect it and select it again, it displays “Item1~Item1~”.

In our previous version (R1SP1) after clicking on an item it only showed “Item1”, without the “~”, maybe this has something to do with the problem.

The WebCombo Version is 4.0.7200.219.

The Browser Version is IE 7.0.6001.18000


Selected a value -> click outside -> select/deselect again -> ...


This would be the Sourcecode:

ASPX Page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Test_Default" %>

<!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></title>
</head>
<body>
<form id="form1" runat="server">

</form>
</body>
</html>

.cs File:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ISNet.WebUI.WebCombo;
using System.Data;
using System.Data.SqlClient;

public partial class Test_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
WebCombo webCombo = new WebCombo("TestWebCombo");
webCombo.Width = Unit.Parse("300px");

webCombo.MultipleSelectionSettings.Enabled = true;
webCombo.MultipleSelectionSettings.AllowBrowseAll = true;
webCombo.MultipleSelectionSettings.AllowNotInListText = true;
webCombo.MultipleSelectionSettings.AutoPositionResultBox = true;
webCombo.MultipleSelectionSettings.SeparatorChar = "~";
webCombo.UseDefaultStyle = true;
webCombo.LayoutSettings.ComboMode = Mode.SingleColumn;
webCombo.LayoutSettings.SearchImage = "./images/Search.jpg";
webCombo.LayoutSettings.TextBoxMode = TextboxMode.ReadOnly;
webCombo.LayoutSettings.EnableAnimation = true;
webCombo.LayoutSettings.ResultBoxWindowType = ISNet.WebUI.DisplayType.Normal;
webCombo.LayoutSettings.RoundCorner = true;

SqlDataAdapter adapt = DatabaseHelperClass.VcsSqlDataAdapter("SELECT 1 as [key], 'test' as name UNION ALL SELECT 2 as [key], 'test2' as name ");
DataTable loadTable = new DataTable();
adapt.Fill(loadTable);
adapt.Dispose();

webCombo.DataTextField = "name";
webCombo.DataValueField = "key";

webCombo.PopulateUnboundData(loadTable, true);

webCombo.IsDynamicCreated = true;
webCombo.AspNetAjaxSettings.CreatedAtRuntime = true;
webCombo.LayoutSettings.AlwaysShowHelpButton = false;
webCombo.LayoutSettings.AllowTextWrapping = false;
webCombo.Visible = true;
form1.Controls.Add(webCombo);
}
}


All times are GMT -5. The time now is 3:04 AM.
Previous Next