Hi
When I clone a ValueList the collection is empry?!
Thanks
Hi,
I tried this out with the following code and it's working fine for me.
private void button1_Click(object sender, EventArgs e) { ValueList valueList = new ValueList(); valueList.ValueListItems.Add(0, "Apple"); valueList.ValueListItems.Add(1, "Banana"); valueList.ValueListItems.Add(2, "Cherry"); ValueList clonedValueList = valueList.Clone(); foreach (ValueListItem item in clonedValueList.ValueListItems) { Debug.WriteLine(item.DisplayText, item.DataValue.ToString()); } }
Result:
0: Apple1: Banana2: Cherry
I had to make a loop and go creating valueList
The screen shots you posted here are too small for me to read. Can you reproduce the issue in a small sample project and post it here so we could check it out?
Ok. Forgive it. i solved with a Loop
Okay, I can read the code, now, but it's hard to tell much from this. What is the valueList in this case? The ValueList property on the column is an IValueList. So this could be any number of a variety of different types. In my example, I used Infragistics.Win.ValueList, but you could be using an UltraDropDown, UltraCombo, UltraComboEditor, etc. and there's no way for me to tell that from this code.
If you say this used to work and now it doesn't, then something may have been broken accidentally or changed on purpose, but without being able to reproduce the issue, I'm afraid I can't guess what the actual issue is.
Direct links of images:
https://dl.dropboxusercontent.com/u/58892347/fmk2infra.gif
https://dl.dropboxusercontent.com/u/58892347/fmk4infra.gif