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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:56:59+00:00 2026-05-14T06:56:59+00:00

I have just started learning MVVM and having a dilemna. If I have a

  • 0

I have just started learning MVVM and having a dilemna.

If I have a a main ViewModel and inside this model I have a number of datasets. Now should I be creating a new ViewModel for each row inside the dataset? Or expose the DataSet itself as a DependencyProperty?

For now the dataset has about 20 rows inside it, and the thought of iterating through each row to create a ViewModel binding to each row…. might not be the best option for performance reasons and memory reasons in the future, like when there are 2000+ rows.

Should I still go ahead and create a RowViewModel and iterate through the dataset creating a new RowViewModel? And have an ObservableCollection of RowViewModels or just expose the DataSet?

The binding for this DataSet/ViewModel will be to a combo box, hence why loading only viewable rows would possibly a performance issue as users expect to be able to scroll without any delays.

Any help would be greatly appreciated.

  • 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-14T06:56:59+00:00Added an answer on May 14, 2026 at 6:56 am

    If you have a complex combo box where each row has an id, name, picture (maybe some logic involved), etc. and you have a View that represents each row, then you would need to create the rowViewModel with all bindings since you have to test that code (TDD!).

    For simple combo boxes where you just want to display a string per row, binding a list of strings or your dataset is more than fine.

    As Peter said, be careful with a combo box that can grow so big as this one. Your users won’t like it 🙂

    Also, since you are concerned about performance, think about using a DataReader populating a list of strings instead of loading a big fat DataSet.

    Cheers,

    André

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

Sidebar

Related Questions

Just started learning Haskell. I have an empty source file with this inside: pe
I have just started learning Javascript and I am absolutely overwhelmed with the number
I have just started learning XNA. This is my first program that I am
Hello i have just started learning mvc2 and im having a problem with the
I have just started learning wordpress plugin development and got this error when I
I have just started learning MVVM. I've made the application from scratch by following
Just started learning MVVM. I have a tabcontrol where I am adding multiple instances
I have just started learning Erlang and am trying out some Project Euler problems
I have just started writing my own JavaScript Framework (just for the learning experience),
I have just started learning objective-C and the iphone sdk and I have a

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.