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
Hi, I submitted a feature request.
Anyway, thank you Mike for your fast reply.
ByeGianni
Hi Gianni,
There is no option to only include non-hidden rows as far as I know. You should Submit a feature request to Infragistics
Hi, I noticed the same problem. Tried suggested solution but... After grid has been filtered, PerformAutoResize(10000) calculates columns width considering ALL rows, filtered out ones too. I don't want to use PerformAutoSizeType.VisibleRows, because it seems to calculate on displayed on screen rows ONLY, it means that if you scroll down on rows that were over displaying area when you called PerformAutoResize, you'll find that rows not correctly resized... Could anyone help me? It is very frustrating... Bye Gianni
That sir is awsome customer support!I appreciate for tracking that down for me Mike. It's works great.
Okay, I tried this out and I got it to work. What you do is, right before you call PeformAutoResize, call:
grid.DisplayLayout.UIElement.VerifyChildElements()