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
50
Set AutoSizeMode Property to one Band only - Is this possible?
posted

 

Hello all,

 

My problem is that I want to set AutoSizeMode just to the parent Band not to the child Bands. Is this possible?

Can anybody tell me how?

 

Best regards

Parents
  • 2501
    Suggested Answer
    posted

    Hello JP,

    Thank you for submitting your question on the Infragistics Forums.  Yes, it is possible to set only the parent Band and not the child Bands to AutoSize.  After the WinGrid is bound to a DataSource, by looping through the parent Band columns collection and calling the PerformAutoResize for each, the parent Band will auto size not effecting the child Bands columns.

    The following code snippet demonstrates how to use the PerformAutoResize for the parent Band columns after setting the AllowColSizing property to Free:

                this.ultraGrid1.DisplayLayout.Override.AllowColSizing = AllowColSizing.Free;

                foreach (UltraGridColumn col in this.ultraGrid1.DisplayLayout.Bands[0].Columns)
                {
                    col.PerformAutoResize();
                }

    Please let me know if you need further assistance.

Reply Children
No Data