This is a migrated thread and some comments may be shown as answers.

what the Better way to do master detail with MVVM ?

0 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gilmar
Top achievements
Rank 1
Gilmar asked on 19 Oct 2010, 07:38 PM
Hello,

I have a question what would be the best way to do a master detail with silverlight. Already inquired with the ViewSourceCollection but still have some doubts about him that I will relate below:

1 - To filter, it does have a bank or only works with data in memory?
2 - It is very fast for records?

In my ViewModels, I have a property called SelectedItem, when I thought about calling this a ViewModel ViewModel daughter and so load the data from ItemSelecionado Father as in the example below.

public class ProductViewModel : ViewModelBase<Product>
{
public ComponentProductViewModel _vmComponentProduct;

public ProductViewModel()
{
this._vmComponentProduct = new ComponentProductViewModel();
}

public ComponentProductViewModel VmComponentViewModel
{
get { return this._vmComponentProduct; }
}


public override Product SelectedItem
{
get
{
return base.SelectedItem;
}
set
{
base.SelectedItem = value;
this._vmComponentProduct.GetDataAsync(string.Empty);
}
}
}


What is the best option? Do it as ViewCollectionSource or use like example ?

thanks

Vinisanp

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Gilmar
Top achievements
Rank 1
Share this question
or