Grid View Cell Error Tooltip

5 posts, 0 answers
  1. Gord
    Gord avatar
    20 posts
    Member since:
    Jul 2014

    Posted 06 Apr Link to this post

    Hello,

    I am trying to set up a WPF RadGridView with cell validation.  I have bound the "CellValidating" event, and within it, when data fails a check, I set the "ev.ErrorMessage" to the message I want displayed, and set "ev.IsValid" to false.  This marks the input element with a red border and a little triangle in the upper right corner.  When mousing over the triangle, it shows the tooltip. 

    What I want is for that tooltip to remain shown at all times the same way that the errors are displayed when an exception is thrown while parsing data.  Is there a way of achieving this? 

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 07 Apr Link to this post

    Hello Gord,

    Please take a look at the Support for "ValidatesOnExceptions" in RadGridView forum thread and more specifically on the ValidationBox_AlwaysVisible project. Let me know whether this corresponds to the behavior that you expect.

    Regards,
    Maya
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Gord
    Gord avatar
    20 posts
    Member since:
    Jul 2014

    Posted 07 Apr in reply to Maya Link to this post

    Hello Maya,

    That is the functionality I want, however, it doesn't appear to work in WPF.  The project works as desired in Silverlight, but when I try to port that code over to WPF, it doesn't work.  I had to update one section <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/> and change the "Value" attribute to "{x:Static Visibility.Visible}" to fix a compile error, but even after that, the tooltip does not appear at all now.

    I did some further fiddling. I have a custom "AdornedElement" object that I can embed into content.  In the template, I wrapped the "<Border...><TextBlock ... errormessage... ></Border>" block inside an "<AdornedElementPlaceholder>" (the custom adorner object) and now I can see the red box but its content is BEHIND all the other cells and controls within that row.  So it looks like the reason that the error message isn't showing, is because it's attached to the grid cell, rather than the grid view itself.

  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 12 Apr Link to this post

    Hi Gord,

    Could you check out this forum thread to verify whether the projects attached there would be of more help?

    Regards,
    Maya
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Gord
    Gord avatar
    20 posts
    Member since:
    Jul 2014

    Posted 13 Apr Link to this post

    Hello Maya,

    Yep, that thread did the trick.

    Looks like my google-fu was a bit weak.  I never found that page while searching for possible solutions. 

    Thanks again for the help. 

Back to Top
UI for WPF is Visual Studio 2017 Ready