We are using 10.1 version of webdatagrid and we would want to know how to make filter accent-insensitive (Our app is for spanish users)
Problem is, imagine we have the next list of values-Jiménez-Bartolome-Juan-MelindaIf we search for the query 'me' we get next matches:-Bartolome-MelindaBut we would want to get-Jiménez-Bartolome-MelindaIn spanish 'é' and 'e' are the same letter, and this accent-insensitive is something you can always set, but we couldnt find how to set it or a workaround for the WebDataGrid
Any help would be appreciated.
P.S. If its not possible, at least I would want to know how to set a tooltip at the filter cell, in order to show some king of 'You have to specify accents' message to the user. This something we also have tried with no success.
Hi endaliadev,
I have created a sample for you which demonstrates how accent independent filtering can be achieved in WebDataGrid.
Note that in the sample there is one row in a DataTable which contains 3 columns: ID,Name and AccentFreeName. The entry in the name column is Jiménez, and the one in the AccentFreeName column - Jimenez.
When this datatable is bound to the WebDataGrid, the AccentFreeColumn is hidden. Upon filtering on the Name column, the filtering event of the grid is handled and the ColumnKey property of the event argument is set to AccentFreeName as such:
if (e.ColumnFilters[0].ColumnKey.Equals("Name")){e.ColumnFilters[0].ColumnKey = "AccentFreeName";Debug.WriteLine(e.ColumnFilters[0].ColumnKey.ToString());}
Please note that the accent free column needs to exist in the data source as the grid filters based on the data source.
Filtering on the name column using "en" as a search string and contains as the type should still return the row from the data table.
Hope this helps.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://www.infragistics.com/support
Hi endaliedev,
I am following up to check if you need further assistance with this matter. Please do not hesitate to contact me if you have any questions.
It seems its working, thank you a lot! I would never have figured out that workaround, but I think its something that it would be nice to be included as a feature for filtering in next versions. Calculate this new column and manual replacement of special symbols is a high cost operation, and 'accentsfree' filtering is something that you can achieve by default search normally at any programming language or database.
Anyway, thanks again!
Thank you for your feedback. Please let me know if I can be of further assistance.