Bugzilla – Bug 322973
DataGrid: Navigation changes dataset
Last modified: 2007-09-25 09:41:45 UTC
---- Reported by kobruleht2@hot.ee 2006-12-16 19:50:05 MST ---- To reproduce: 1. Run the code in MONO 1.2 .NET 2.0 profile in Windows XP 2. Press Down arrow 3 times Observed: Window caption contains text "changed" Expected: Window caption must contain text "unchanged" Code to reproduce: using System.Windows.Forms; using System.Data; class TestForm : Form { DataGrid dataGrid1; DataSet d = new DataSet(); static void Main() { Application.Run(new TestForm()); } public TestForm() { InitializeComponent(); d.ReadXml("c:\\test.xml"); dataGrid1.DataSource = d; dataGrid1.DataMember = "Table"; d.AcceptChanges(); } private void InitializeComponent() { this.dataGrid1 = new System.Windows.Forms.DataGrid(); this.Controls.Add(this.dataGrid1); } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { DataSet changes =d.GetChanges(); if (changes == null) Text = "not changed"; else Text = "changed"; return base.ProcessCmdKey(ref msg, keyData); } } ---- Additional Comments From kobruleht2@hot.ee 2006-12-16 19:50:59 MST ---- Created an attachment (id=171114) xml file used to create dataset in repro code ---- Additional Comments From toshok@ximian.com 2006-12-17 01:26:13 MST ---- this is not a winforms bug, is it? ---- Additional Comments From toshok@ximian.com 2006-12-21 13:02:08 MST ---- Created an attachment (id=171115) system.data diff that fixes this bug ---- Additional Comments From kobruleht2@hot.ee 2006-12-21 17:17:07 MST ---- Can you change lines if (col.DataContainer.CompareValues (Current, Proposed) != 0) changed = true; to (col.DataContainer.CompareValues (Current, Proposed) != 0) { changed = true; break; } ---- Additional Comments From toshok@ximian.com 2007-01-18 12:25:40 MST ---- why? ---- Additional Comments From kobruleht2@hot.ee 2007-01-18 14:14:58 MST ---- If grid cah 1000 columns and first column is changed, this is faster since remaining columns are not compared. Imported an attachment (id=171114) Imported an attachment (id=171115) Unknown operating system unknown. Setting to default OS "Other".
Whatever the patch, this now repro's as fixed at 1.2.5_5 (Win32). Setting it so.