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
205
PerformAutoResize bug?
posted

The following code attempts to size a one column Ultragrid to the size as it's column after executing a PerformAutoResize.  The column is filtered with each key typed into uxInput.  The problem is that the filter works but the PerformAutoResize is based on the pre-filtered list.   What am I missing?

Thanks,
Jeremy 

 

Private Sub OnInput_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles uxInput.ValueChanged 

        With uxSuggestionList.Rows.ColumnFilters(0)
            .ClearFilterConditions()

            If Not String.IsNullOrEmpty(uxInput.Text) Then
                Dim column As UltraGridColumn = uxSuggestionList.DisplayLayout.Bands(0).Columns(0)
                .FilterConditions.Add(New FilterCondition(column, FilterComparisionOperator.Contains, uxInput.Text))
            End If

        End With

        column.PerformAutoResize() 
        uxSuggestionList.Width = column.Width

 End Sub