We have up-graded Infragistic 6.3 to 2009 v2. In old version we were using the logic of inserting the same key in exception handling. Whenever a new key is adding if that key already exists in the listview then an exception of already key exists occur. But after up-gradation with same code listview is adding a null value if same key is inserting and exception occur.
This is the strange behavior as our application is running from last 3 years and suddenly start throwing exception.
Is this a bug and modification in listview?
Generally speaking we try to maintain legacy behavior with new versions, and (except in rare circumstances) when we fail to we consider it a regression bug.
I just checked and the latest build of NA2009.2 throws a duplicate key exception as expected. The only circumstance under which it doesn't is when the key is null or empty, and this behavior is by design and has been in effect for as long as I can remember.
If you like you can post a simple sample project here and we can take a look.
My problem is not about that it is not throwing an exception. It is throwing exception of duplicate key exception but also adding a null value in UltraListview collection. It should not add null value in case of duplicate key exception.
Because in old version it is throwing an exception but not adding a null value in collection.
Please try again and check the count of listview collection you will find a null value has been added that behavior is not matching with legacy.
Hi,
Use this code and then you will see the count of Ultralistview.Items.Count.
I think it should not add a null value on exception. I am using Infragistics 2009 v2.
try
{
ultraListView1.Items.Add("A");
ultraListView1.Items.Add("B");
ultraListView1.Items.Add("C");
MessageBox.Show("Items count before adding Same Key: " + ultraListView1.Items.Count.ToString());
}
catch (Exception)
MessageBox.Show("Items count after adding Same Key in exception: " + ultraListView1.Items.Count.ToString());
My input is still cannot reproduce. As I stated originally if you post a sample project (or at the very least a few lines of code) that demonstrates the problem we will look into it.
Please give me your input on this issue. It is simple like walk in park. You can produce as I mentioned in above post.