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
765
window, where I can select which columns to display
posted

Hello,

the wingrid have in the upper left corner a  window, where I can select which columns to display.

Now I have two header lines (gridLayout.Bands[0].ColHeaderLines = 2). In the first line the description and in the second line the unit (description + Environment.NewLine + unit).

In the window (where I can select which columns to display) I see only the description and not the unit.

What I must do that I can see description and the unit (in a single line)?

Alexander 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Alexander,

    The window you are referring to is called the ColumnChooser. I don't think it currently supports displaying more than one line of text for each header.

    This seems like a bug to me. The ColumnChooser should take on the same settings as the grid so the full caption displays. I'm going to forward this thread over to Infragistics Developer Support so they can writ it up for developer review.

    In the mean time, you can probably work around this by explicitly setting the height of the rows in the ColumnChooser. Something like this:


            private void ultraGrid1_BeforeColumnChooserDisplayed(object sender, BeforeColumnChooserDisplayedEventArgs e)
            {           
                // Hook into the column chooser events.
                UltraGrid columnChooserGrid = (UltraGrid)e.Dialog.ColumnChooserControl.Controls[0];
                columnChooserGrid.InitializeRow += new InitializeRowEventHandler(columnChooserGrid_InitializeRow);
                e.Dialog.FormClosed += new FormClosedEventHandler(columnChooserDialog_FormClosed);
            }

            void columnChooserDialog_FormClosed(object sender, FormClosedEventArgs e)
            {
                // Unhook from the column chooser events.
                ColumnChooserDialog columnChooserDialog = (ColumnChooserDialog)sender;
                columnChooserDialog.FormClosed -= new FormClosedEventHandler(columnChooserDialog_FormClosed);
               
                UltraGrid grid = columnChooserDialog.ColumnChooserControl.Controls[0] as UltraGrid;  
                grid.InitializeRow -= new InitializeRowEventHandler(columnChooserGrid_InitializeRow);
            }

            void columnChooserGrid_InitializeRow(object sender, InitializeRowEventArgs e)
            {           
                e.Row.Height = 50;
            }

     

     

Children
No Data