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 6641409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:48:27+00:00 2026-05-25T23:48:27+00:00

I am developing a Silverlight web app and got stuck on the current problem.

  • 0

I am developing a Silverlight web app and got stuck on the current problem.

Is it possible to make a field required only if value is entered into another field. For example if you have a DataForm to save cars. The car model is only required except if you choose a car type from the dropdown list (SUV, Compact, Sports car) you have to also enter the number of doors.

To make it clear:

Name – required

Engine type – not required

Tyres – not required

Car type – not required

Number of doors – required only if car type is chosen

how can i do that?

Edit: I would like to be able to show the error messages at the bottom as well as highlighting controls that are required

  • 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-25T23:48:28+00:00Added an answer on May 25, 2026 at 11:48 pm

    What you need to do called Entity-level validation. Instead of validating 1 property – you need to validate whole object.

    To do that – you need to implement INotifyDataErrorInfo. Than on your backing object you will need to handle property setter for CarType. When it changes – you would raise error for NumberOfDoors (if it is not set). Same thing, if NumberOfDoors set – you will need to manually clear that error.

    Here you can see some good examples on how this is done: http://www.silverlight.net/learn/data-networking/validation/implementing-data-validation-in-silverlight-with-inotifydataerrorinfo

    Also, as a side note – you will max out DataForm capabilities very soon if you will need more advanced scenarios.

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

Sidebar

Related Questions

I am developing a web app using silverlight. I read that Microsoft offers 10
I am developing a Silverlight web app and am working now on a child
I am developing a Silverlight app using VS2008 Express. I have just implemented a
I'm developing a Silverlight app that makes multiple async requests to a number of
I'm developing a small web application using Microsoft Silverlight 3. I'm using Microsoft Expressin
At the moment I'm developing a web based application using Silverlight 3.0. For the
I am currently developing a Silverlight 3 app that needs some sort of user
I'm developing a Silverlight 3 app and getting this really weird error when I
We are developing a Silverlight app with long-running workflows that need to be persisted,
I am developing silverlight web part for sharepoint 2010. I have an xml file

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.