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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:24:32+00:00 2026-05-21T20:24:32+00:00

I am building a silverlight app. My requirement is to have Users select a

  • 0

I am building a silverlight app. My requirement is to have Users select a number of skills that apply to them, from a larger list of skills.

Tables: Candidate => CandidateSkills; SkillsCategories => Skills. I think the schema is self explanatory. The front end will show all skills (grouped into different categories), and when the candidate logs in, only his selected skills will show in the check boxes. Fairly simple.

My question: Do I bring all the Skill entities to the front end and then get the CandidateSkill entities, loop through them and set the checkboxes accordingly or is their a easier/better way?

Thanks

  • 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-21T20:24:33+00:00Added an answer on May 21, 2026 at 8:24 pm

    I recommend building a class to use as a ViewModel. The class should contain at least a property to indicate whether the item is selected, the text to present, and either the model entity itself or its key.

    You can create the set of view model objects by left-joining the set of all skills to the individual candidate’s skills, and setting IsSelected to the result of a non-null test on the candidate skill.

    You can then bind directly to the ViewModel.

    I had a similar situation (Users to Permissions instead of Candidates to Skills) once, and I used this resource as a starting point. I hope it helps.

    In my case, I had a “Save” button which, upon click, would run some code-behind code to iterate through the selected items and submit them to my Web service. Without knowing the details of your data and service implementation, I’ll not clutter up the post with the nitty-gritty details.

    Best of luck!

    Comments for Discussion

    Here is a pseudo-LINQ procedure creating view models by issuing two database calls:

    var userskills = database.CandidateSkills
                           .Where(cs => cs.UserId == someUserId)
                           .Select(cs => cs.SkillId)
                           .ToList();
    var skills = from s in database.Skills
                 select new CandidateSkillViewModel()
                 {
                     Text = s.SkillName,
                     IsSelected = userskills.Contains(s.SkillId),
                     Value = s.SkillId
                 };
    mylist.ItemsSource = skills;
    

    This would give you a bindable data source. Ultimately, using this pattern, you’ll have to translate selections/deselections into inserts/deletes by hand. For me, I do this in the handler for the button click. I retrieve a fresh set of candidate skills, iterate through the items of the list, and insert/delete instances of CandidateSkill as needed.

    I realize that depending on a button click to resolve my viewmodel state into database operations might not be considered by purists to be complete MVVM, but it worked for me.

    I hope this helps a little more.

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

Sidebar

Related Questions

I'm building a wp7 Silverlight app. I need a list that is able to
I'm building an app that generates a grid of HubTile objects from the Silverlight
This morning I tried running a Silverlight 5 App that we have been building
I'm building a Windows Phone 7 app in Silverlight. I have a list of
I am building a web app in Silverlight which allows users to view and
I have been building a client / server app with Silverlight, web services, and
I'm building a silverlight app in Blend that will contain a treeview and treeviewitems.
I'm building a Silverlight app using Jounce for my MVVM. I have a CustomerListViewModel
I am building a silverlight application that needs to have a login page and
I'm building a Silverlight application and one of my caveats from last time was

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.