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
2114
Select columns in a WinGrid
posted

I wonder how to implement in the WinGrid the column selection.

 

When a grid has a lot of columns, some columns should be hidded others, displayed, as user desires, like in the Windows Explorer in Details mode:

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    You could turn on the grid's built-in ColumnChooser dialog like so:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                UltraGridOverride ov = layout.Override;

                ov.RowSelectors = DefaultableBoolean.True;
                ov.RowSelectorHeaderStyle = RowSelectorHeaderStyle.ColumnChooserButton;
            }

     

    You could also call the ShowColumnChooser to show the column chooser without enabling the grid's built-in UI for it.

    Or, you could use an UltraGridColumnChooser control and hook it up to the grid and display it in your own dialog or however you want.

Children