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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80293 --- shadow/80293 2006-12-17 19:03:22.000000000 -0500 +++ shadow/80293.tmp.24933 2006-12-17 19:03:22.000000000 -0500 @@ -0,0 +1,42 @@ +Bug#: 80293 +Product: Mono: Class Libraries +Version: 1.2 +OS: +OS Details: Ubuntu 6.10 +Status: NEW +Resolution: +Severity: +Priority: Minor +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: the DataGridView.DataSource property should take in account the AutoGenerateColumns property value + +namespace : Windows.Forms +class : DataGridView +property : DataSource + +When assigning the DataSource property with a collection supporting the +IList interface, the DataGridView component add new columns by +introspecting first item of the list (method BindIList) even if the +AutoGenerateColumns property is set to false. + +This is an implementation proposal of DataGridView.BindIList : + +private void BindIList (IList list) { + if (list.Count > 0 && AutoGenerateColumns) { + DataGridViewCell template = new DataGridViewTextBoxCell(); + foreach (PropertyDescriptor property in +TypeDescriptor.GetProperties(list[0])) { + DataGridViewColumn col = new DataGridViewColumn(template); + col.Name = property.DisplayName; + columns.Add(col); + } + } +... + +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
