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
150
ValueList Or UltraComboEditor case sensitivity
posted

Hi,

Has ValueList or UltraComboEditor become case sensitive ? It seems so as the following code used to work whether the valueMember was upper or lower case (my db collation is not case sensitive) - it doesn't anymore once migrated to 11.1 :

myUltraComboEditor.ValueList = GetValueList(paramEnum.Salutation)

where GetValueList is a method that returns an Infragistics ValueList :

Public Function GetValueList(ByVal sourceTable As ParamEnum) As ValueList

    Dim list As New ValueList With {.SortStyle = ValueListSortStyle.Ascending}
    Dim AddToList As Action(Of Object, Object, String) = _
        Sub(element, valueText, displayText)
            Dim item As ValueListItem = list.ValueListItems.Add(valueText, displayText)
            item.Tag = element
        End Sub
        Select Case sourceTable
            Case ParamEnum.Salutation: Repository.Salutation.ForEach(Sub(a) AddToList(a, a.Code, a.Name))
            'Case ...
    End Select
    Return list
End Function

 

Any idea or workaround ?

Thanks,

Xavier

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Xavier,

    What kind of case sensitivity are you seeing here? There's nothing in this code that would make the ValueList do any kind of string comparison, so I'm not sure what we're talking about.

    I assume you must mean the AutoSuggest functionality. But it's not case sensitive as far as I know.

    I tried it out by creating a ValueList with some duplicate texts that differ only by case:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                ValueList vl = layout.ValueLists.Add("MyValueList");
                vl.ValueListItems.Add(0, "apple");
                vl.ValueListItems.Add(1, "APPLE");
                vl.ValueListItems.Add(2, "banana");
                vl.ValueListItems.Add(3, "BANANA");
               
                UltraGridBand band = layout.Bands[0];
                band.Columns["Column 0"].ValueList = vl;

            }

    If I enter a cell in this column and enter a capital "A", it selects "apple" in lower case, since that's the first item on the list that begins with "a" regardless of case.

    I have attached my sample here in case you want to try it out on your machine and see if you get the same results.

     

    WindowsFormsApplication15.zip
Children