[Mono-bugs] [Bug 331649] New: DataGridView: NRE in set_RowCount

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 7 12:02:09 EDT 2007


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

           Summary: DataGridView: NRE in set_RowCount
           Product: Mono: Class Libraries
           Version: 1.2
          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: ---


Observed:

Object reference not set to an instance of an object

Environment:  MONO 1.2.5 .NET 2 profile


Code to reproduce:

using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;

public class VirtualJustInTimeDemo : Form {
        DataGridView dataGridView1 = new DataGridView();

        protected override void OnLoad(EventArgs e) {
                this.AutoSize = true;
                this.Controls.Add(this.dataGridView1);
                this.dataGridView1.RowCount = 123;
                this.dataGridView1.VirtualMode = true;
                this.dataGridView1.CellValueNeeded += new
                               
DataGridViewCellValueEventHandler(dataGridView1_CellValueNeeded);
                base.OnLoad(e);
        }

        private void dataGridView1_CellValueNeeded(object sender,
                        DataGridViewCellValueEventArgs e) {
                e.Value = e.RowIndex;
        }

        [STAThreadAttribute()]
        public static void Main() {
                try {
                        Application.Run(new VirtualJustInTimeDemo());
                }
                catch (Exception ex) {
                        MessageBox.Show(ex.ToString());
                }
                }

}


-- 
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