Bug 322973 (MONO80281) - DataGrid: Navigation changes dataset
Summary: DataGrid: Navigation changes dataset
Status: RESOLVED FIXED
Alias: MONO80281
Product: Mono: Class Libraries
Classification: Mono
Component: Windows.Forms (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: 1_2
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-17 02:50 UTC by Forgotten User lsqq-oKg62
Modified: 2007-09-25 09:41 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
xml file used to create dataset in repro code (21.07 KB, application/octet-stream)
2006-12-17 02:50 UTC, Thomas Wiest
Details
system.data diff that fixes this bug (530 bytes, patch)
2006-12-21 20:02 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:19:56 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".

Comment 1 Andy Hume 2007-09-25 09:41:45 UTC
Whatever the patch, this now repro's as fixed at 1.2.5_5 (Win32).  Setting it so.