[Mono-bugs] [Bug 80364][Wis] New - Arrow and Tab keys not working in DataGrid
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Dec 26 10:40:43 EST 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 kobruleht2 at hot.ee.
http://bugzilla.ximian.com/show_bug.cgi?id=80364
--- shadow/80364 2006-12-26 10:40:43.000000000 -0500
+++ shadow/80364.tmp.26087 2006-12-26 10:40:43.000000000 -0500
@@ -0,0 +1,67 @@
+Bug#: 80364
+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: Arrow and Tab keys not working in DataGrid
+
+To reproduce:
+
+1. Run the code
+2. Activate first cell.
+3. Enter data, try Tab and Down arrow keys
+
+Observed:
+
+1. Tab does not move to next column
+2. Down arrow does not move to next row
+
+Code to reproduce:
+
+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[] keys = new DataColumn[1];
+ DataColumn column1 = new DataColumn();
+ DataColumn column2 = new DataColumn();
+ DataGrid grid = new DataGrid();
+
+ grid.Dock = DockStyle.Fill;
+ table.Columns.Add(column1);
+ table.Columns.Add(column2);
+ keys[0] = column2;
+ table.PrimaryKey = keys;
+ Controls.Add(grid);
+ table.RowChanging += new DataRowChangeEventHandler
+(OnRowChanging);
+ grid.SetDataBinding(table, "");
+ }
+
+ private void OnRowChanging(object sender, DataRowChangeEventArgs
+e) {
+ if (e.Action == DataRowAction.Add) {
+ string pk = e.Row.Table.PrimaryKey[0].ColumnName;
+ if (e.Row[pk] == null)
+ e.Row[pk] = new System.Guid();
+ }
+ }
+ }
More information about the mono-bugs
mailing list