TextSearch in DataGrid
-
Wednesday, June 02, 2010 8:31 AM
I'm having trouble getting TextSearch to work in DataGrid.
Are there any code samples out there? Has anybody got it working?
All Replies
-
Wednesday, June 02, 2010 8:35 AM
Hi guge,
The following sample may help you: http://blogs.microsoft.co.il/blogs/tomershamam/archive/2009/08/27/wpf-datagrid-search-and-highlight.aspx
Sincerely,
Jarrey
Best day, Best life- Marked As Answer by Linda LiuModerator Monday, June 07, 2010 6:16 AM
- Unmarked As Answer by guge Monday, June 07, 2010 6:33 AM
- Marked As Answer by guge Monday, June 07, 2010 6:33 AM
- Unmarked As Answer by guge Monday, June 07, 2010 6:33 AM
-
Tuesday, June 08, 2010 3:55 AMModerator
Hi Guge,
I think the link Jarrey provided gives a solution to your problem. If you don't think so or have any concern, please feel free to let us know.
Sincerely,
Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Tuesday, June 08, 2010 6:04 AM
Linda,
It was very nice of Jarrey to take time to write his reply. But it did not answer my question.
I wanted to know if TextSearch, which is a very specific functionality, really works with DataGrid. I need this for my blind users who like to navigate by typing the first couple of letters of a cell value that they know to be on some row in the current column.
Jarrey's reply made no reference to the TextSearch function, but instead offered a completely different technique to solve a very different requirement.
I appreciate Jarrey's reply, and I may some day make use of it, but it was not an answer to my question.
If you really think that Jarrey's reply was an answer to my question I would have to interpret it to the effect that it is an answer in the negative, to the effect that there are no code samples out there and that noone has gotten TextSearch to work in DataGrid.
However, I remain optimistic and believe that I may have overlooked some minute detail in my failed attempt to get TextSearch in DataGrid.
Yours truly,
Guge -
Wednesday, June 09, 2010 6:40 AMModerator
Hi Guge,
Thank you for your reply!
What's the TextSearch function do you mean?
As far as I know, the WPF DataGrid control doesn't support text search by itself. We have to program to implement this functionality.
Sincerely,
Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Wednesday, June 09, 2010 9:17 AM
Hi Linda,
DataGrid has a property called IsTextSearchEnabled which it inherits from ItemsControl. You can find it on the list of properties at
http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid_properties(v=VS.100).aspxThat's the kind of TextSearch I'm interested in. It is implemented in ListView/GridView and ListBox, among others.
You can read more about TextSearch at
http://msdn.microsoft.com/en-us/library/system.windows.controls.textsearch(v=VS.100).aspxI have not seen any documentation that indicates that DataGrid doesn't support this inherited functionality.
(But so far, WPF documentation seems to be lagging behind the usually satisfactory standard of MSDN.)Yours truly,
Guge -
Thursday, June 10, 2010 5:03 AMModerator
Hi Guge,
Thank you for your reply! I understand what you mean and your concern now.
I performed a test on DataGrid's support for TextSearch, and found DataGrid doesn't support TextSearch. You may submit a feedback on this issue in Microsoft Connect web site:
https://connect.microsoft.com/visualstudio
Sincerely,
Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer by guge Thursday, June 10, 2010 5:56 AM
-
Thursday, June 10, 2010 6:10 AM
Hi Linda,
Thanks for taking time to look into this. I have sent a suggestion through the link you gave me.
I may have to implement something akin to TextSearch for the DataGrids in my project, but at least I won't be wasting precious time flogging a dead horse.
I simply can't end this exchange without expressing my profound disappointment in learning that some properties are visible in the VS WPF designer and the documentation but have no effect. Having used Visual development tools from Microsoft since Windows 3.1 I have always had the feeling that if a property is visible and listed in the documentation, it must surely have an effect. With WPF, which I love, it is not that simple.
Yours truly,
Guge -
Tuesday, February 15, 2011 4:10 PM
I second the disappointment and frustration expressed by Guge.
Here is the link to the Microsoft Connect ticket regarding this issue:
If you would like this functionality supported, please up-vote it so Microsoft knows it is important to us.
-
Monday, August 15, 2011 4:31 PMAgreed, don't understand how a property can be published with no underlying support. This is a bug.
JP

