[Mono-bugs] [Bug 48671][Maj] New - ListBox - Multi Selection bug (A fix is provided)
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 21 Sep 2003 10:26:11 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by yaronsh@mainsoft.com.
http://bugzilla.ximian.com/show_bug.cgi?id=48671
--- shadow/48671 2003-09-21 10:26:11.000000000 -0400
+++ shadow/48671.tmp.10145 2003-09-21 10:26:11.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 48671
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: yaronsh@mainsoft.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ListBox - Multi Selection bug (A fix is provided)
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+Items are not selected when the ListBox is at MultiSelection mode.
+
+Steps to reproduce the problem:
+1. Open the attached aspx file.
+2. Click on the "Bind" Button.
+3. Select some items
+
+Actual Results:
+None of the items is selected
+
+Expected Results:
+The selected items should be selected
+
+How often does this happen?
+Always
+
+Additional Information:
+The bug source is the line:
+if(!updated) Select(final);
+that should be:
+if(updated) Select(final);
+But I made additional optimizations to the algorithm so I highly suggest
+to insert my whole implementation for the method.
+
+<%@ Page language="c#" AutoEventWireup="false" %>
+<%@ Import Namespace="System.Data" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<HTML>
+ <HEAD>
+ <script runat="server" language="C#">
+private void BtnBind_Click(object sender, System.EventArgs e)
+ {
+ DataSet ds = new DataSet();
+ ds.ReadXml( Server.MapPath("TestDB.xml") );
+
+ LbTest.DataTextField = "Name";
+ LbTest.DataSource = ds;
+ LbTest.DataBind();
+ }
+ </script>
+ </HEAD>
+ <body>
+ <form id="Form1" method="post" runat="server">
+ <asp:ListBox id="LbTest" AutoPostBack="True"
+runat="server" SelectionMode=Multiple Width="288px"
+Height="72px"></asp:ListBox>
+ <asp:Button id="BtnBind" OnClick="BtnBind_Click"
+runat="server" Text="Bind"></asp:Button>
+ </form>
+ </body>
+</HTML>