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
885
Set Widths Of UltraDropDown Columns?
posted

I'm perplexed - trying to set the column widths of an UltraDropDown to suit the contents of the columns of the control, and want the AllRowsInBand option, but I don't seem to be able to get it right?

I have two visible columns, a code, and a description.

I put code in the InitializeLayout event as shown below.

However, the description is never resized to show the full contents of the field - can I get a clue? TIA

Private Sub udrpActivities_InitializeLayout(sender As System.Object, e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles udrpActivities.InitializeLayout

        Dim column As UltraGridColumn

        For Each column In e.Layout.Bands(0).Columns

            If column.IsVisibleInLayout Then

                column.AutoSizeMode = ColumnAutoSizeMode.AllRowsInBand
                column.PerformAutoResize()

            End If

        Next

    End Sub

  • 48586
    posted

    Hello, ­­­­­

     

    I am just checking about the progress of this issue. Let me know If you need my further assistance on this  issue?

     

    Thank you for using Infragistics Components

  • 48586
    posted

    Hello ,


    As far as I am understand from the description of your scenario, you want to resize UltraDropDown, so that all columns (in your case code and description columns to be resized based on the content of their cells) all visible columns to be resized, based on their cells. The code which you are testing works, and it should be in some event, where the column of UltraDropDown are already populated with data. So I have tried to put your code in AfterDropDown event of UltraDropDown and this works for me. Please see attached sample.

    Please let me know if you have any further questions or if I am missing something

    91782.zip