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
1660
Merging two columns in an ultragrid
posted

Hi Infragistics Team,

I have a grid as shown below

After the column 'Type', there are two empty columns. Need to merge these two columns as shown below in the grid

Kindly assist me to achieve this solution.

  • 23930
    Offline posted

    Hi Thangachan,

    Thank you for posting in our forums.

    Merging works only if you have the same values in a two adjacent columns. So in this case, since you have different values in your columns, it is not really applicable. What I would suggest to do in this case is to hide the empty columns and make the “Type” column larger. You can hide a column by setting its Hidden property to true and you can control its width from the Width property:

                ultraGrid1.DisplayLayout.Bands[0].Columns["EmptyColumn1"].Hidden = true;
                ultraGrid1.DisplayLayout.Bands[0].Columns["EmptyColumn2"].Hidden = true;
                ultraGrid1.DisplayLayout.Bands[0].Columns["Type"].Width = 200;

    Please let me know if you have any additional questions.