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
580
PerformAutoResizeColumns() & BindingSource
posted

Hello!

I use BindingSources for my UltraGrids!
But on which event i have to use the PerformAutoResizeColumns() function?

This not works correctly: 

this.BindingSource.DataSource = Repository.GetAlleUsers(); this.ultraGrid1.DisplayLayout.PerformAutoResizeColumns(false, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand, true);
 
Thanks 4 Help!!!

  • 20872
    Offline posted

    Hello Mygil,

    I am still following this forum thread. Have you been able to try the suggested approach?

    Please feel free to let us know if you have any other questions with this matter.

  • 20872
    Offline posted

    Hello Mygil,

    What you could do here, is to handle the InitializeLayout event of yout UltraGrid and perform this action there like:

    private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                e.Layout.Override.AllowColSizing = AllowColSizing.Free;
                e.Layout.PerformAutoResizeColumns(false, PerformAutoSizeType.AllRowsInBand,true);
            }

    If you have any other questions please feel free to let us know.