Hello,
We've upgraded our project to .NET 4.0 en Infragistics V14.1. However, a grid that used to work now seems to freeze with our data structure. I've narrowed it down to a small data structure. An example is below. I know the data structure doesn't really make sense, but it does in our project.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using Infragistics.Win.UltraWinGrid; namespace WindowsFormsApplication1 { public partial class Form1 : Form { private readonly BindingList<Template> Templates = new BindingList<Template>(); public Form1() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); var ultraGrid1 = new UltraGrid(); Controls.Add(ultraGrid1); ultraGrid1.DataSource = Templates; } } public class Template : IListOfTasks { //[Browsable(false)] public IList<Task> Processes { get; private set; } public Template() { Processes = new List<Task>(); } #region ITasks Members //[Browsable(false)] public IList<Task> ListOfTasks { get { return Processes; } } #endregion } public class Task : IListOfTasks { public IList<Task> Subtasks { get; private set; } public Task() { Subtasks = new List<Task>(); } #region ITasks Members public IList<Task> ListOfTasks { get { return Subtasks; } } #endregion } public interface IListOfTasks { IList<Task> ListOfTasks { get; } } }
Could you please take a look why it freezes? If you comment out both [Browsable(false)], it does work, so that is the workaround I'm using now. But I hope I can make this work without any workarounds.
I'm using version 14.1.20141.2059. Just to clarify, it did work in the previous version we used: v10.3.
Thanks in advance.
Hello Reinier,
Thanks a lot for the information. I am glad you managed to solve the issue you've got. It is a really strange behavior why the project works on 3.5 but not on 4.0 version of the .NET Framework and I can not think of any reason why this happens.
Let me know if you have any additional questions concerning Infragistics's components.
Hi, TorX here (I had to switch accounts because all our keys are registered to our IT account, and I can't seem to register them to my own account).
I figured out why it did work in the older version. When creating the small sample project, I stripped too much of the code. The actual code uses a binding source between the grid and the Templates. Now if you do this in the sample project, the grid still freezes. However, if you also change the target framework to .NET 3.5, the grid won't freeze. So that's why it seemed to work in our old code.
No, you're right. I think something must have changed in our data structure before the upgrade, and hadn't noticed this problem. Thanks again!
I am glad that you was able to solve this issue.
I run the code you provided using 10.3. 1000 version of the Infragistic’s components and the same issue occurs. Which exact build are you using? Please see attached zip. Based on the provided code I could not tell why your project has worked before and you know that we add more functionality and improve our product form version 10.3 up to now so there might be some other functionality that affect the binding. If you are interested of investigating this further could you please make a simple sample based on your project that provides more code, so I will be able to investigate this on my side and test it with the different versions?
I am waiting for your feedback.
That solved my problem, thanks! However, I'm still wondering why I didn't have this problem in v10.3.