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,
The issue you’ve got usually occurs when you try to bind the UltraGrid to a recursive data source and because of that the grid takes a long time to display and freezes.
Eventually the grid will visualize after some time but if you want to force the grid to load up to a certain number of bands you could use the MaxBandDepth property of the UltraGrid. More information about the property you could find here:
http://help.infragistics.com/Help/Doc/WinForms/2011.2/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v11.2~Infragistics.Win.UltraWinGrid.UltraGridLayout~MaxBandDepth.html
I hope that this will help you.
Please do not hesitate to contact me if you have any further question.
That solved my problem, thanks! However, I'm still wondering why I didn't have this problem in v10.3.