https://bugzilla.novell.com/show_bug.cgi?id=650140
https://bugzilla.novell.com/show_bug.cgi?id=650140#c0 Summary: rowCount / Rows.Count is 0 after DataGridView.DataSource is assigned Classification: Mono Product: Mono: Class Libraries Version: 2.4.x Platform: x86-64 OS/Version: Ubuntu Status: NEW Severity: Normal Priority: P5 - None Component: Windows.Forms AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729) I habe a DataGridView. When I assign a BindingSource (List<object> as DataSource) to the DataGridView and I print out the RowCount I get 0. The DataGridView fills the Columns/Rows with the Data. e.g List<string> dataList = new List<string>(); dataList.Add("string 1"); dataList.Add("string 2"); dataList.Add("string 3"); dataList.Add("string 4"); dataList.Add("string 5"); BindingSource bs = new BindingSource(); bs.DataSource = dataList; DataGridView dgv = new DataGridView(); dgv.DataSource = bs; // assign binding source to datagridview Console.WriteLine("rows:" + dgv.RowCount); // here I get 0 but the DataGridView hast 1 Column and 5 Rows (with "string1", ...) I also tried to create my own DataGridView. When I override the OnPaint Method, then the RowCount is 5. When I override the OnDataSourceChanged Method the RowCount is 0. Reproducible: Always Steps to Reproduce: 1. Add BindingSource to DataGridView 2. Print out RowCount or Rows.Count (of the DataGridView) 3. Expected Results: RowCount / Rows.Count should not be 0 after assigning a DataSource (>0 items) -- 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
