This is a migrated thread and some comments may be shown as answers.

'Hyperlinks' in templated grid cell breaks the search highlighting

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bastien
Top achievements
Rank 1
Bastien asked on 26 Sep 2017, 08:46 PM

Hello,

I'm looking to create generic templates where displayed info, if of a certain type, would be styled as an hyperlink (blue foreground and underlined). When clicked, the button (My first implementation was using a styled RadButton) sends a command from the code-behind. 

Unfortunately, my current implementation even though it works great breaks the Highlighting of the cell and text when searching via the Full search text box on top of the grid.

I have been looking in the source code to understand the way it was implemented, but even templating GridViewCell doesn't seem to work (it never seem to be in Highlighted mode)

 

Any idea?

Best Regards,

Bastian

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Sep 2017, 01:00 PM
Hello Bastien,

When the CellTemplate of a given column is predefined, it is expected the highlighting of the search mechanism not to be working. The control is simply not aware what element is defined within the DataTemplate. Thus, it cannot highlight its content. A possible approach that you can adopt would be to define a custom TextBox element that supports highlighting. Such solution is demonstrated in the Highlighting inline Search for RadGridView blog post. A similar approach but through the usage of a custom column can be observed in the Custom Highlight Column SDK Example.

This, however, is already discussed in the Highlghting doesn't work while searching/filtering forum thread you opened regarding a similar inquiry. May I kindly ask you to clarify whether you are experiencing any specific obstacles to implementing one of the suggested solutions?

Regards,
Stefan X1
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Bastien
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or