RadGridView validation and IDataErrorInfo

10 posts, 0 answers
  1. Alan
    Alan avatar
    8 posts
    Member since:
    Aug 2010

    Posted 21 Jan 2011 Link to this post

    I am using the RADGrid view in a WPF application and need to add validation for a couple of properties that are bound to the grid. I have implemented IDataErroinfo on may data object class that is the source of my binding. The validation is working almost like I need it to.

    when the application loads and my property values are not valid the validation works as expected. My cells with invalid data is surrounded with a red line and I get the icon displayed in front of the row with errors. When I edit the cell and correct the data the red outline of the cell goes away it I tab out the cell or hit enter. However the error icon stays unless I hit the enter key or tab through all the cells in the row.

    The behavior I am trying to achieve is that when the user leaves(by using the enter key,tab out of the cell or when the cell loses focus)  the cells and no other cells contain data the error icon disappears as well.

    I am also using the cell validating event on the RadGrid view to validate the cell data and that seems to work except the error indicator stays there.

    Thanks,
    Alan Frye

  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 24 Jan 2011 Link to this post

    Hi Alan,

    Could you please send me a sample project that demonstrates the described issue? I believe that we will solve the problem shortly.
    You should open a separate support ticket in order to be able to attach files.
    Thank you in advance.

    Kind regards,

    Nedyalko Nikolov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 08 Jun 2011 Link to this post

    I'm having this problem as well.

    When a user clicks the new row buttong to add a new row, I have validation checks in place to show errors immediately on fields that are required. But if the user cancels the new row, although the row goes away, the error icon in the row header does not go away, so my "new row" row has an error icon.

    I cannot attach photos to show a screenshot of what my row looks like. How do I tell the grid to remove that error icon?
  5. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 09 Jun 2011 Link to this post

    Hi Rayne,

    Could you confirm that you can reproduce the described behavior with our latest internal build?
    If the issue persists, it will be very helpful to send me at least the code you are using to validate the new row.
    Thank you in advance.

    All the best,
    Nedyalko Nikolov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 09 Jun 2011 Link to this post

    I just updated my project to the latest build (2011.1.0606) and it still does the same thing, but...

    If I set ValidatesOnDataErrors = InEditMode then it doesn't do that, because it only reports validation errors when you in editMode for each cell. I'd like to be able to let the user navigate away from the row, but keep the Validation notifications so they know there is a problem.

    I'm extending my EF entities using partial classes and implementing IDataErrorInfo to report validation problems. When I create a new entity, I'm adding validation errors to the entity so that the user immediately sees which fields are required (indicated by the red outlines on the cell).

    Do you still need to see the validation code?
  7. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 10 Jun 2011 Link to this post

    Hi Rayne,

    Generally if you want to enable such kind of validation (aka "asynchronous validation"), perhaps you need to set ValidatesOnDataErrors = InViewMode, this way the user will be able to see the errors and edit another item.

    Indeed a sample project will be the best option in this case, but any information that could bring more light to the problem is welcome.

    Regards,
    Nedyalko Nikolov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 10 Jun 2011 Link to this post

    I will submit a ticket with a sample application.
  9. haagel
    haagel avatar
    52 posts
    Member since:
    Feb 2010

    Posted 30 Aug 2011 Link to this post

    Have the issue with that icon that is not disappearing been resolved? I'm having the issue right know, but I'm not running the latest version of Telerik (I'm running 2010.3.1314.40). So my question is basically: will this issue go away if I update my telerik dlls?
  10. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 02 Sep 2011 Link to this post

    Hello Haagel,

    Most probably the issue will be fixed, but I cannot be sure without a sample project.
    If you send me a sample project (with steps to reproduce the problem), I'll check it against latest version and will notify you accordingly.

    Best wishes,
    Nedyalko Nikolov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  11. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 02 Sep 2011 Link to this post

    I think if you update your controls, the problem should go away. It did for me. The version I'm using is 2011.2.712.40 and I no longer have the problem of the error icon staying after canceling a new row.
Back to Top
UI for WPF is Visual Studio 2017 Ready