Insensitive search

Hi there,

I can set FilterCaseSensitivity in filters to be case insensitive.

How can I set the @search to be case insensitive when searching all the string columns?

Thanks.

Since in this case filtering is outside of the DataGrid before assigning Data property you can use some of the approaches from this thread:

Hi there,

Sorry to pester as I really have no idea on where should I change in order to work. I can only see the following codes:

    protected async Task Search(ChangeEventArgs args)
    {
        search = $"{args.Value}";

        await grid0.GoToPage(0);

        fy2024Customers = await aapr4_v12Service.GetFy2024Customers(new Query { Filter = $@"i => i.remarks1.Contains(@0) || i.remarks1text.Contains(@0) || i.customerid.Contains(@0) || i.customeruen.Contains(@0) || i.hqid.Contains(@0) || i.approvedby.Contains(@0) || i.enteredby.Contains(@0) || i.country.Contains(@0) || i.accountno.Contains(@0) || i.customername.Contains(@0) || i.customername1.Contains(@0) || i.contact.Contains(@0) || i.accountscontact.Contains(@0) || i.telephone.Contains(@0) || i.facsimile.Contains(@0) || i.email.Contains(@0) || i.paymentterm.Contains(@0) || i.currencyid.Contains(@0) || i.gsttaxcode.Contains(@0) || i.addressline1.Contains(@0) || i.addressline2.Contains(@0) || i.addressline3.Contains(@0) || i.addressline4.Contains(@0) || i.pricegroup.Contains(@0) || i.postalcode.Contains(@0) || i.debitaccount.Contains(@0) || i.creditaccount.Contains(@0) || i.staffid.Contains(@0) || i.customergroup.Contains(@0) || i.territory.Contains(@0) || i.emailaccounts.Contains(@0) || i.billingtype.Contains(@0) || i.designation.Contains(@0) || i.activeobsolete.Contains(@0) || i.shortname.Contains(@0) || i.gstregistrationno.Contains(@0) || i.guid_acc.Contains(@0) || i.guid_cus.Contains(@0)", FilterParameters = new object[] { search } });
    }

Will really appreciate you can point me to the location to change. If I have to change each of the fields, it will be quite tedious and I am having more than 200 tables. In other programming languages, I simply define LOWER(myfield) = LOWER(mvar).

I am using PostgreSQL 16.2. For those commands without LOWER, I utilize the ILIKE '%mvar%'. It seems that PostgreSQL does not support case insensitive collation correctly in all version after PostgreSQL 12. Using the CITEXT affects the performances pretty significantly.

How can I incorporate the LOWER command into the codes?

Thanks.

You can create your own method if you want to use directly SQL, Radzen Blazor Studio generates applications with Entity Framework where you can use LINQ which is later translated to SQL. If you need case insensitivity for your entire database you can use case-insensitive collation.

Hi there,

Case insensitive collation will basically fail if I were to issue ...WHERE ... LIKE 'mvar%'.

But... I just have to avoid using the above queries.

Will try to redefine all the tables with the case insensitive collation to resolve my issue.

Thanks.