'Hyperlinks' in templated grid cell breaks the search highlighting

2 posts, 0 answers
  1. Bastien
    Bastien avatar
    4 posts
    Member since:
    Jan 2017

    Posted 26 Sep Link to this post

    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

  2. Stefan
    Admin
    Stefan avatar
    773 posts

    Posted 29 Sep Link to this post

    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.
Back to Top