[Mono-bugs] [Bug 80422][Wis] New - Unexpected column in DataGrid with DataGridColumnStyle

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jan 1 08:26:41 EST 2007


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 kobruleht2 at hot.ee.

http://bugzilla.ximian.com/show_bug.cgi?id=80422

--- shadow/80422	2007-01-01 08:26:41.000000000 -0500
+++ shadow/80422.tmp.17261	2007-01-01 08:26:41.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 80422
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: kobruleht2 at hot.ee               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unexpected column in DataGrid with DataGridColumnStyle
+
+To reproduce:
+
+Run the code
+
+Observed:
+
+Grid contains 2 columns
+
+Expected:
+
+Grid should contain 0 columns
+
+Code:
+
+using System.Windows.Forms;
+using System.Data;
+static class Program
+{
+	static void Main()
+	{
+		Application.Run(new Frm());
+	}
+}
+
+class Frm : Form
+{
+	public Frm()
+	{
+		DataTable table = new DataTable();
+		DataColumn column1 = new DataColumn();
+		DataGrid grid = new DataGrid();
+		table.Rows.Add();
+		grid.Dock = DockStyle.Fill;
+		table.Columns.Add(column1);
+		Controls.Add(grid);
+
+		DataGridTableStyle tableStyle = new DataGridTableStyle();
+		DataGridColumnStyle colStyle = new DataGridTextBoxColumn();
+		// colStyle.MappingName = "Column1";
+		tableStyle.GridColumnStyles.Add(colStyle);
+		grid.TableStyles.Add(tableStyle);
+		grid.DataSource = table;
+		table.Columns.Add("another hidden column");
+	}
+}


More information about the mono-bugs mailing list