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
1075
UltraGrid freezes when bound to specific structure
posted

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.

Parents Reply Children