I don't know what's problem?

Posts   
 
    
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 26-May-2006 07:52:02   

IPredicateExpression setfilter = new PredicateExpression(); GetPersonalDataTypedList TypeList = new GetPersonalDataTypedList(); string str = "%" + textBox1.Text.ToUpper()+ "%"; FieldLikePredicate flike=new FieldLikePredicate(TypeList.TitleColumn, null, str); flike.CaseSensitiveCollation = true; setfilter.Add(flike);

SortExpression sorter = new SortExpression(PersonTableFields.City |SortOperator.Ascending); TypeList.Fill(0, sorter, false ,setfilter); dataGridView1.DataSource = TypeList;

it displays error on new FieldLikePredicate(TypeList.TitleColumn, null, str);

i don't know why?rage

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 26-May-2006 08:15:31   

Try using the following instead:

FieldLikePredicate flike = new FieldLikePredicate(YourEntityFields.YourField, str);

replace YourEntity & YourField with the appropriate Entity Name, & Field Name.

ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 26-May-2006 09:08:02   

Yess,it worked, great thanx i have trought that 'TypeList.TitleColumn' will also work.(as it's part of one table field) I was wrong