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
90
How to limit grouping to only one column?
posted

Hi,

  is it possible to limit grouping of UltraWinGrid so that it can be grouped by only one column? I want the user to be able to drag a column to grouping area to group by that column. After that, I want to disable other columns to be added to grouping.  Thanks for any help!

  Best regards
  Peter

Parents
  • 90
    posted

    Btw, the reason why I'm trying to do this is that grouping by more than one column doesn't work in my Infragistics2 v10.1 and since we are right before an important release, I cannot afford upgrading (not that I am sure it is solved in newer versions). It looks like this:

    Ungroupped:

    Grouped by one column (OK):

    Grouped by two columns (NOT OK):

    Everything is set to default, I just created a new project, put an UltraWinGrid on the form and created some data for it:

     

    using

     

     

    System.Collections.ObjectModel;
    using System.Windows.Forms;

     

     

     

    namespace

     

     

    WindowsFormsApplication1
    {
      public partial class Form1 : Form
      {
        readonly Collection<Class1> list = new Collection<Class1>();

        public Form1()
        {
          InitializeComponent();

          list.Add(new Class1{ColumnA = "01", ColumnB = "AA", ColumnC = "01", ColumnD = "AA"});
          list.Add(
    new Class1{ColumnA = "02", ColumnB = "AB", ColumnC = "01", ColumnD = "BB"});
          list.Add(
    new Class1{ColumnA = "03", ColumnB = "AC", ColumnC = "02", ColumnD = "CC"});
          list.Add(
    new Class1{ColumnA = "04", ColumnB = "AD", ColumnC = "02", ColumnD = "DD"});
          list.Add(
    new Class1{ColumnA = "01", ColumnB = "BA", ColumnC = "03", ColumnD = "AA"});
          list.Add(
    new Class1{ColumnA = "02", ColumnB = "AA", ColumnC = "03", ColumnD = "BB"});
          list.Add(
    new Class1{ColumnA = "03", ColumnB = "BC", ColumnC = "04", ColumnD = "CC"});
          list.Add(
    new Class1{ColumnA = "04", ColumnB = "AD", ColumnC = "04", ColumnD = "DD"});
          list.Add(
    new Class1{ColumnA = "01", ColumnB = "AA", ColumnC = "05", ColumnD = "AA"});

          ultraGrid1.DataSource = list;
        }
      }
    }

     

     

     

     If someone could help me with this, I wouldn't need the help with previous post :)  Thanks.

     P.

Reply Children