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
170
UltraListView new item add problem
posted

Hi,

The version is UltraListView.13.2.

I add new item to list say key is "new item" and value is "new  value", then remove the item from the list. And the create new item having  the same key with deleted item. When I try to add this item to the list, I got the error "Key Already Exists".

In fact, At the beginning, the problem occurred when I tried to add a new item having the key that the list did not contain same key to the list. Before adding step, I broke the application and none of the list items have the same key with the new item.

Parents
No Data
Reply
  • 53790
    posted

    Hi,

    I try to reproduce your issue, using the code below, but everything seems to works properly. If you think that I didn`t reproduce your scenario, feel free to modify my code (or create a small sample) to reproduce the issue. I`ll be glad to research it for you.

      // Addnew item

    UltraListViewItem it1 = new UltraListViewItem("Test item ", new object[] { "a", "aa", "aaa" });

    it1.Key = "new key";

    ultraListView1.Items.Add(it1);

     

    // Remove the item

    UltraListViewItem it2 = ultraListView1.Items["new key"];

    ultraListView1.Items.Remove(it2);

               

    // Add the item with the same key

    UltraListViewItem it3 = new UltraListViewItem("Test item ", new object[] { "a", "aa", "aaa" });

    it3.Key = "new key";

    ultraListView1.Items.Add(it3);

     

    Let me know if you have any questions

Children