Could somebody tell me whats wrong in below code. I get an error message while i try to add the below code in my project:
An unhandled exception of type 'System.ArgumentException' occurred in infragistics.win.v3.1.dll. Additional information: Can't add a ValueListItem to a value list item collection
Dim ValueListItem1 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItem
Dim ValueListItem2 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItem
ValueListItem1.DataValue = False
ValueListItem1.DisplayText = "Date/Facility"
ValueListItem2.DataValue = False
ValueListItem2.DisplayText = "Facility/Date"Me.optSort.Items.Add(ValueListItem1) - ERROR Here Cant add a valueListItem to value list item collectionMe.optSort.Items.Add(ValueListItem2)
Is there any more information in the error message? It looks like you are paraphrasing the error instead of posting the exact text.
What is optSort in this code?
Mike,
Friend WithEvents optSort As Infragistics.Win.UltraWinEditors.UltraOptionSet
Error:
An unhandled exception of type 'System.ArgumentException' occurred in infragistics.win.v3.1.dll
Additional information: Can't add a ValueListItem to a value list item collection
Unhandled Exception: System.ArgumentException: Can't add a ValueListItem to a value list item collection
at Infragistics.Win.ValueListItemsCollection.System.Collections.IList.Add(Object value)
at Infragistics.Win.ValueListItemsCollection.Add(ValueListItem item)