Validation before item edited

4 posts, 0 answers
  1. Niranjan
    Niranjan avatar
    23 posts
    Member since:
    Feb 2009

    Posted 04 Mar 2010 Link to this post

    Hi,

    Can someone help me to implement validation before node editing is complete?

    I want to validate the edited value and if it is not proper then want to rollback to old value or want to give proper error message.

    Thanks in advance.

    Regards,
    Niranjan
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 09 Mar 2010 Link to this post

    Hello Niranjan,

    Please take a look at the sample project I prepared for you and let me know if it helps.

    Regards,
    Tihomir Petkov
    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.
  3. Niranjan
    Niranjan avatar
    23 posts
    Member since:
    Feb 2009

    Posted 10 Mar 2010 Link to this post

    Hi Tihomir Petkov,

    Thanks for your reply.

    The example you provided is really nice.

    In my project when I add service reference I will get the classes "Employee" and "Company". So if I make changed there related to validation and then when i update the service reference the changes will be lost.

    So is there any other way for validation??

    Regards,
    Niranjan
  4. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 10 Mar 2010 Link to this post

    Hello Niranjan,

    Well, I can't think of a workaround at the moment, but I believe updating the service reference will not occur very frequently, right? To minimize the amount of overwritten code you can extract the validation logic in a static class somewhere and only add the calls to the validation methods in the setters.

    Best wishes,
    Tihomir Petkov
    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.
Back to Top