System.Windows.Forms.DataGridView.RefreshColumns() Inefficiency - by thoshaw

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 776261 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/10/2013 9:07:56 AM
Access Restriction Public


The System.Windows.Forms.DataGridView.RefreshColumns() method calls boundColumns = this.dataConnection.GetCollectionOfBoundDataGridViewColumns() even when AutoGenerateColumns is false.  This causes the instantiation of numerous DataGridViewColumn objects that simply fall out of scope.  It would seem like this call should be moved inside the AutoGenerateColumns check.
Sign in to post a comment.
Posted by Tanya [MSFT] on 1/21/2013 at 10:40 AM
Thank you for reporting this issue. Customer feedback is a critical part of a successful, impactful software product. Unfortunately another part is the reality of schedules and the need to prioritize investments according to the objectives of the product. We have evaluated the issue that you have reported and at this point in the product's lifecycle, it does not meet the criteria to be addressed. This evaluation is carefully done and considers many aspects including the cost of the fix, implications of the change, and the number of reported instances of the issue.
Many customers have found it useful to discuss issues like this in the forums ( where Microsoft and other members of the community can recommend ways of achieving the behavior you are interested in.

Thank you,
The Windows Forms Product Team
Posted by Microsoft on 1/16/2013 at 2:06 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by thoshaw on 1/11/2013 at 9:57 AM
I've attached a demo project. If you profile this application, you'll see that 50 DataGridViewTextBoxColumns are being instantiated in the bowels of the framework only to be discarded since DataGridView.AutoGenerateColumns is false. This looks to simply be an inefficiency in the framework. There's nothing erroneous displayed to the end user.
Posted by Microsoft on 1/10/2013 at 6:00 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting a demo project. Please submit this information to us within 4 business days. We look forward to hearing from you with this information.
Posted by Microsoft on 1/10/2013 at 9:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(