Inotifydataerrorinfo - Validation Message Styling

4 posts, 0 answers
  1. Madhu
    Madhu avatar
    30 posts
    Member since:
    May 2011

    Posted 31 Oct 2011 Link to this post

    Hi,

    Is there a way to keep the Validation Message always visible to user instead of having to hover over the red border?

    Regards,
    Madhu
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 03 Nov 2011 Link to this post

    Hi Madhu,

    The validation message is always visible if the control is in focus. Initially, you could edit the template of the RadComboBox in Blend and extract the ValidationToolTip template. In that way you will be able to edit/remove the animation for showing the tooltip. You can edit the ComboBox in Blend by dragging the control on the design surface, right-clicking it and choosing from the menu Edit Template-> Edit a Copy. In that way you will have all the resources need for the change.
    Also, I can suggest you to use the Summary label as demonstrated in this online demo.

    Hope this information helps.

    Greetings,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
  4. Madhu
    Madhu avatar
    30 posts
    Member since:
    May 2011

    Posted 04 Nov 2011 Link to this post

    Thanks for the reply Konstantina.

    We were able to achieve this partly by inserting the tooltip in <VisualState x:Name="InvalidFocused"> as well. Now when I tab out of a textbox, the tooltip is visible.

    The problem we face now is if I close a wizard when these tooltips are visible (Cancel out of a Wizard without rectifying the errors), the tooltip remains visible.
    Is there a way to forcefully clear out validation error messages while cancelling out?

    Regards,
    Madhu
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 07 Nov 2011 Link to this post

    Hello Madhu,

    I suppose an easier way will be to create your own error message, instead. Showing/hiding the validation tooltip will be more effort consuming, then just putting a TextBlock for example and binding its Text property to Validation.Errors attached property. Also, you could change the visibility of the TextBlock using the Validation.HasError property. With just a bit styling, like adding a red border behind the TextBlock, you will have a error message, that you will be able to show/hide whenever needed.

    Kind regards,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top