[Mono-bugs] [Bug 345483] New: DataGridView: DataTable thru BindingSource not displayed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 3 04:33:05 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=345483

           Summary: DataGridView: DataTable thru BindingSource not displayed
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: kobruleht2 at hot.ee
         QAContact: mono-bugs at ximian.com
          Found By: ---


To reproduce, run the code.

Observed:

empty grid

Expected:

Grid should contain one row


Code:

using System;
using System.Windows.Forms;
using System.Data;

public class Test {
    static void Main() {
        Application.Run(new Form1());
    }
}

class Form1 : Form {
    public Form1() {
        Controls.Add(new Grid());
    }
}

class Grid : DataGridView {
    public Grid() {
        BindingSource BindingSource = new BindingSource();

        DataSet dataSet1 = new DataSet();
        dataSet1.Tables.Add();
        dataSet1.Tables[0].Columns.Add();
        dataSet1.Tables[0].Columns.Add();
        dataSet1.Tables[0].Columns.Add();
        dataSet1.Tables[0].Columns.Add();
        dataSet1.Tables[0].Columns.Add();
        dataSet1.Tables[0].Rows.Add("111111", "222222", "333333", "444444",
"555555");

        BindingSource.DataSource = dataSet1.Tables[0];
        DataSource = BindingSource;
    }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list