开发者

Filter a gridview ignoring accents

开发者 https://www.devze.com 2023-01-09 01:41 出处:网络
I am trying to filter开发者_如何学编程 a gridview with a filter expression like this \"SurName like \'%surname%\' AND FirstName like \'%firstname%\'\"

I am trying to filter开发者_如何学编程 a gridview with a filter expression like this

"SurName like '%surname%' AND FirstName like '%firstname%'"

So far it works fine except in one edge case: Some name's have an accent in them. We want to display these names with an accent but when searching I would like to use an accent insentive search. How do I do this? I tried useing the SQL COLLATE command and that worked when I did a test query on the database but not in the filter expression for a gridview.

Please could I have some advice?


Before binding the datasource to the gridview add an extra column with de-accented version of the column you want to filter. Then run the filter on the modified column but display the original.

0

精彩评论

暂无评论...
验证码 换一张
取 消