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
165
Single Header for two columns
posted

In my project i have a requirement where you can give a single header for two columns. Lets a take an example... logistics domain... for a particular road say NH4( name of the road) we need to send the containers to a customer say Cust_Bu. these containers can be either loaded of empty. 

                       cust_bu

                     L               E

NH4            10             20

 

This is how the grid should look like.

Please advise.

  • 20872
    Suggested Answer
    Offline posted

    Hello basuph,

    What you could do in order to achieve similar behavior is to add an UltraGridGroup to your UltraGrid, set the desired caption and add the columns to it, in the InitializeLayout event like the following:

     private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
    {
     UltraGridGroup ugr = new UltraGridGroup();
     e.Layout.Bands[0].Groups.Add(ugr);
     ugr.Columns.Add(e.Layout.Bands[0].Columns[0]);
     ugr.Columns.Add(e.Layout.Bands[0].Columns[1]);
     ugr.Header.Caption = "Group Header";
    }

    Please let me know if you have any other questions with this matter.