WinForms comboBox

Posts   
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 18-Mar-2007 14:10:59   

Scenario: LLBLv2 (Febryary 12,2007) BL Platform: Adapter UI Platform: WinForms

Description: I have a standard winforms comboBox data-bound to an entity collection (ecEmployees) that retreives all employees.

I want to use the collection's FindMatches() method to retrieve the index of an employee in the collection by his name.

Dim matches As List(Of Integer) = Me.ecEmployees.FindMatches(DAL.HelperClasses.EmployeesFields.FirstName = "Omar")

This works fine. The issue I am having is the string comparison is case-sensitive so that if I change the predicate to filter for "omar" (all small caps) I don't retrieve any matches.

Is there a way to write the predicate in this fashion

DAL.HelperClasses.EmployeesFields.FirstName.ToUpper() = "OMAR"
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Mar-2007 19:13:16   

omar wrote:

Dim matches As List(Of Integer) = Me.ecEmployees.FindMatches(DAL.HelperClasses.EmployeesFields.FirstName = "Omar")

try with likePredicate filter, or the short way "Mod" (in Visual Basic):

Dim matches As List(Of Integer) = Me.ecEmployees.FindMatches(DAL.HelperClasses.EmployeesFields.FirstName Mod "Omar")

Hope helpful.

David Elizondo | LLBLGen Support Team