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)
Dave, The link works, do i need to add any other references to my code? I already have the following:
infragistics.Shared.v3.1Infragistics.Win.Misc.v3.1Infragistics.Win.UltraWinEditors.v3.1Infragistics.Win.UltraWinGrid.v3.1Infragistics.Win.UltraWinMaskedEdit.v3.1Infragistics.Win.UltraWinSchedule.v3.1Infragistics.win.v3.1
Do i have to add anyother reference to the code. Thanks for your help
Still get the same error msg.
Hello Shiv,
Thank you for your response.
I'm a bit confused. You say you have NetAdvantage 2008 Volume 2 installed, but your list of references shows NetAdvantage 2003 Volume 1. Please verify which version you are using.
Dave,
I tried adding the referrences but its throwing an error msg. Screenshot AttCHED
Instead of trying to add the DLLs manually, you should use our Version Utility to upgrade the references that currently exist in your project.
You can find the Version Utility on the Start Menu inside the Infragistics folder.
Since your project was originally using NetAdvantage 2003 Volume 1, it's probably still being built against version 1 of the CLR. You need to change the project properties so the project is built against version 2.0 or newer of the CLR. In order to do this, you will need to use at least Visual Studio 2008 since earlier versions don't provide the ability to change the version of the CLR you are targeting. Once the project is targeting CLR2 or greater those errors should disappear.
Dave, I am sorry, still am getting err msg. I did add the dlls with ur utility to upgrade the references. But still it throws the err msg. Screenshot attched