[Mono-bugs] [Bug 78807][Nor] New - Using TableStyles with Datagrid fails
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jul 10 17:08:57 EDT 2006
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 roger.jakobsson at jorosoft.se.
http://bugzilla.ximian.com/show_bug.cgi?id=78807
--- shadow/78807 2006-07-10 17:08:57.000000000 -0400
+++ shadow/78807.tmp.28719 2006-07-10 17:08:57.000000000 -0400
@@ -0,0 +1,78 @@
+Bug#: 78807
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Ubuntu
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: roger.jakobsson at jorosoft.se
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Summary: Using TableStyles with Datagrid fails
+
+Description of Problem:
+When using Tablestyles in the DataGrid an exception is thrown.
+
+Steps to reproduce the problem:
+1. Compile the following:
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Data;
+
+namespace TableStyleTest
+{
+ class Form1 : Form
+ {
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+
+ public Form1()
+ {
+ DataGrid grd = new DataGrid();
+ grd.Size = new Size(200,200);
+ this.Controls.Add(grd);
+
+ DataTable tb = new DataTable("TestTable");
+ tb.Columns.Add("Col1");
+ tb.Rows.Add(new string[] {"row 1"} );
+ tb.Rows.Add(new string[] {"row 2"} );
+ tb.Rows.Add(new string[] {"row 3"} );
+
+ DataGridTableStyle ts = new DataGridTableStyle();
+ ts.MappingName = "TestTable";
+
+ DataGridTextBoxColumn txt = new
+DataGridTextBoxColumn();
+ txt.MappingName = "Col1";
+ txt.HeaderText = "Column 1";
+ ts.GridColumnStyles.Add(txt);
+
+ grd.TableStyles.Add(ts);
+
+ grd.DataSource = tb;
+ }
+ }
+}
+
+2. Run with Mono in Linux
+
+Actual Results:
+System.NullReferenceException
+
+Expected Results:
+Loading the form and displaying the grid just as in Windows/MS.NET
+
+How often does this happen?
+Always
+
+Additional Information:
+Tested in Ubuntu 6.06 with Mono from SVN as of today.
More information about the mono-bugs
mailing list