RadGridView Validation Styling

6 posts, 0 answers
  1. Arthur
    Arthur avatar
    32 posts
    Member since:
    May 2012

    Posted 11 Jul 2012 Link to this post

    Hi all,

    I am currently using the RadGridView with the IDataErroInfo interface to perform validation with my View Model.

    This is currently working as expected but I would like to change the cell validation style, in particular the tooltip and the how the red border around the cell works.

    I would like to continue to use the IDataErrorInfo interface for the validation but just change the error template being used (rather then to start building cell template selectors for example)

    Thanks in advance!
  2. Arthur
    Arthur avatar
    32 posts
    Member since:
    May 2012

    Posted 12 Jul 2012 Link to this post

    Update,

    I have followed this guide http://www.telerik.com/help/wpf/gridview-styling-cell.html to generate the template for the GridViewCell.

    However, although I can use this template to style many properties of the Grid, it doesn't allow me to change the validation border or the tool tip . 

    With further investigation if I change the edit template to a text block rather than the default text box then both the default border and the border set in the generated style appears.

    Is there no way to remove the default tooltip and red validation border??

    I was hoping to get a template similar to this for silverlight 

    (http://www.telerik.com/community/forums/silverlight/gridview/setting-error-message-to-show-error-tooltip-cellvalidating-event.aspx)


    which I could then style to suit my needs.


    Any help here would be much appreciated




  3. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1216 posts

    Posted 13 Jul 2012 Link to this post

    Hi Arthur,

    These elements are not included in GridViewCell's template. In order to achieve this you should predefine GridViewEditorPresenter's Template. The validation border is named: "ValidationErrorElement". Please let us know if you need any further assistance with this.

    Regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  4. Arthur
    Arthur avatar
    32 posts
    Member since:
    May 2012

    Posted 13 Jul 2012 Link to this post

    OK thanks,

    For anyone interested a sample is available here

    http://www.telerik.com/community/forums/wpf/gridview/validation-error-tooltip.aspx

  5. Aarvey
    Aarvey avatar
    4 posts
    Member since:
    Oct 2012

    Posted 28 Mar 2013 Link to this post

    I am getting a red border around the row when i am selecting a row and remains red. i don't want to show this red borer. My grid is read only, but i have done a two way data binding with the IsSelected property of the row. I tried to remove this border by setting ValidatesOnDataErrors="None", but this is not working. How can i remove the red border ?
  6. Yoan
    Admin
    Yoan avatar
    1180 posts

    Posted 01 Apr 2013 Link to this post

    Hi Aarvey,

    Can you give us more details how the validation is performed in your application? Are you using DataAnnotations? It will be great if you can send us a sample project which reproduces the problem? We will debug it on our side and will check what is going on.


    Kind regards,
    Yoan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top