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
Hello Xavier,
I have test the metioned behavior also going back to the NetAdvnatage 2009 vol2, and it is always case sensitive.
If you could provide me in which version of our controls the behavior of value list is case insensitive I would be glad to take a look at it.
If you have any other questions please do not hesitate to contact us.
Hi Xavier,
I tried this out and I get the same results - the matching for the ValueMember is case sensitive.
I also tried going back to some older versions. I went back as far as v8.1 and I still got the same results.
What version were you using where this worked in a case insensitive way?
Hi Mike.
I am not talking about autosuggest but simple databinding. I am not (and cannot) using integers for the keys but strings. My param table looks like this :
datavalue - displayValue
tbval - To Be Validated
valid - Validated
rejec - Rejected
if my bound item contains a 'status' of valid, the combo correctly displays the displayValue, if it is VALID, then nothing is displayed.
Hope I am clearer...
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.