AnsweredAssumed Answered

.Net Controls

Question asked by thomasje on Nov 14, 2012
Latest reply on Nov 18, 2012 by changmeikuan
In utilization of the .Net controls, dealing with the System.Windows.Forms.DataGridView control, when I reference the DataGridView.Columns which returns the DataGridViewColumnCollection, I am able to enumerate through the columns with the Agilent "For Each Element In" control with no problems. However, whenever I try to work with the DataGridView.Rows element which returns the DataGridViewRowCollection object, it will give me an error stating that the object does not implement the System.Collections.IEnumerable.GetEnumerator when I try to enumerate through the rows in the collection with the Agilent "For Each Element In" control. If one looks at the Microsoft documentation for both the DataGridViewColumnCollection and the DataGridViewRowCollection you will see that they both implement the System.Collections.IEnumerable.GetEnumerator method.

Please investigate and advise.

I have attached the portion of the program whereby I am trying to enumerate through the columns and rows of the DataGridView control. I have not attached the entire program due to size constraints.