|
Bugzilla – Full Text Bug Listing |
| Summary: | DataGridView: DataTable thru BindingSource not displayed | ||
|---|---|---|---|
| Product: | [Mono] Mono: Class Libraries | Reporter: | Forgotten User lsqq-oKg62 <forgotten_lsqq-oKg62> |
| Component: | Windows.Forms | Assignee: | Jonathan Pobst <jpobst> |
| Status: | RESOLVED FIXED | QA Contact: | Mono Bugs <mono-bugs> |
| Severity: | Minor | ||
| Priority: | P5 - None | ||
| Version: | 1.2.6 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | DataGridView | ||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Bug Depends on: | |||
| Bug Blocks: | 345484 | ||
Fixed in r103713. Thanks for the report and test case! 2008-05-21 Jonathan Pobst <monkey@jpobst.com> * DataGridView.cs: When binding to a BindingSource, get the underlying list to bind to. [Fixes bug #345483] 2008-05-21 Jonathan Pobst <monkey@jpobst.com> * DataGridViewDataBindingTest.cs: Add test for bug #345483. |
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; } }