This code is filtering but i want using like!Im using TypedList.
Could you help me!
IPredicateExpression Filter = new PredicateExpression();
if (txtCompanyName.Text != "")
{
Filter.Add(CustomerFields.Name % txtCompanyName.Text );
}
if (txtName.Text != "")
{
Filter.Add(ContactFields.Firstname % txtName.Text);
}
if (txtSurname.Text != "")
{
Filter.Add(ContactFields.Lastname % txtSurname.Text);
}
if (txtTel.Text != "")
{
Filter.Add(ContactFields.WorkPhone % txtTel.Text);
}
ISortExpression Sort = new SortExpression();
Sort.Add(CustomerFields.Name | SortOperator.Ascending);
ds_Customers.FilterToUse = Filter;
ds_Customers.SorterToUse = Sort;
ds_Customers.Refetch = true;
ds_Customers.DataBind();
dgCustomer.DataBind();