Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6114635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:59:51+00:00 2026-05-23T14:59:51+00:00

In my application,I am working on WPF with MVVM design pattern doing validations through

  • 0

In my application,I am working on WPF with MVVM design pattern doing validations through Enterprise Library using configuration file.
I want to validate my grid cell values through enterprise library configuration file.In my view model I have an objservalble collection property that is bound to the datagrid in a view.
Then,I want to validate one of my cell value for range validation using enterprise library..But I am not finding any proper way to do the same.I don’t want to use any custom validator rather want to achieve with the enterprise library configuration file only.

Actually while adding a validation to datagrid column we are binding like:-

<xa:ValidatorRule RulesetName="NameOfRuleset" SourceType="{x:Type vm:ViewModelType}" SourcePropertyName="NameOfProperty" ValidationSpecificationSource="Configuration" ValidatesOnTargetUpdated="True" />

But as in this case my view model will not have a property specifically for this field rather it has collection,so i am stucked on how to do the same,
Can anyone please guide me how to achieve the same.Please let me know if my explanation is not clear enough.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:59:52+00:00Added an answer on May 23, 2026 at 2:59 pm

    Found a solution for the same.
    Created a one more class for my collection & in configuration file as well as in view I am refering to that class type only instead of refering to my viewmodel.
    Reason why I created new class is I am using Entity framework & i cannot refer to DAL layer in my UI but I can refer to my own type in view.

    In this way it solved my problem of adding validation rules to the datagrid that is binded to the collection.

    Incase anybody needs sample code,let me know I can provide the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a WPF application, and I'm structuring it using the MVVM pattern.
I am working on a client/server (WPF/WCF) application using the MVVM pattern. Properties on
I'm creating a WPF application using the MVVM design pattern, and I'm trying to
I'm building a WPF application and working with the MVVM pattern. I have 4
I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application
I'm writing a WPF application using the MVVM pattern, based on the following article:
I'm working on an WPF application using the mvvm-light framework. I'm new to both
I'm working in WPF using the MVVM pattern, and generally things seem to be
I am currently working on an application using WPF and MVVM. Now if I
I've been doing WPF applications with the MVVM pattern using Visual Studio, coding C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.