Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
bug in Infragistics ValueList ver 2012 Vol2
posted

Hi

When I clone a ValueList the collection is empry?!

Thanks

Parents
No Data
Reply
  • 469350
    Offline posted

    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: Apple
    1: Banana
    2: Cherry

Children