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
60
Multi Column Header Implementation on Ultragrid
posted

I am working on adding a multi column header on an already existing ultragrid headers in windows application using C#. I couldn't find anything at design time to add a multi column header. please advise how I can do this.

Thanks

Parents
No Data
Reply
  • 69832
    Offline posted

    Assuming that by "multi column header" you mean a header that appears above the column headers and that groups one or more columns together, you can add an UltraGridGroup to the UltraGrid.DisplayLayout.Bands[x].Groups collection, and assign a reference to that instance to the UltraGrid.DisplayLayout.Bands[x].Columns[y].Group property.

    Example:
    UltraGridGroup group1 = this.ultraGrid.DisplayLayout.Bands[0].Groups.Add( "group1" );
    UltraGridGroup group2 = this.ultraGrid.DisplayLayout.Bands[0].Groups.Add( "group2" );

    this.ultraGrid.DisplayLayout.Bands[0].Columns["Column1"].Group = group1;
    this.ultraGrid.DisplayLayout.Bands[0].Columns["Column2"].Group = group2;
    this.ultraGrid.DisplayLayout.Bands[0].Columns["Column2"].Group = group2;

Children
No Data