I have asked this question at more than one forums and it seems that no one wants to take a kund on it too. is. / P>
My problem is simple and I think that everyone uses it while using SQL from LINQ.
If you have a LINQ object: the person and you want to list the list box, this task is simple based on all the people in your DB:
Binding List selection view; Visible = (binding auction scene) archive Videoco.get default (Datacentext. Parsons);
Now say that you want to put a text box on the list to filter the results. Which will not work with the IBIDIL ILIL interface because the SQL objects are given incorrect returns on the "Canfilter" property by LINQ.
Most people have done this which make the observable selection, following is an example,
selection of inspection & lt; Person & gt; Col = new inspective selection & lt; Person & gt; (Datacontex. Persons. ToList ()); ListCollectionView View = (ListCollectionView) CollectionViewSource.GetDefault (Col.);
Since this will return a ListCollectionView and there will be no BindingListCollectionView it will be filterbelt and is well with all the world.
Here comes the problem, say that you have a multi level forward for the main relationship: the person & lt; --- Alias & lt; --- Ticket
And now you want to pair the 3 catalogs, when a person is selected, the second list box is just his nickname and when the selection of a nickname is shown only this ticket It is very easy with binding and synchronizing. The problem is that if I want to add a text box filter to all the list boxes tabs (one person has more than 1000 aliases and I want to be able to filter them to choose 1).
Important solution will not work as ObservebleCollection because all objects are returned to objects EntitySet objects for on-line relation, and this will not return any filterbell binding list to the visualization, and the list will not return the list view.
The only way around this is that the Observer Collection runs manually based on the rearranged question, it is a difficult task and causes the BusnessObjects layer and the application layer to tie. This is also very slow because you need to make many trips to the database ...
Does anyone have the solution?
Thank you, Eric.
I think model visual view-model pattern (MVVM) will help you. Create a scene for your first list box and make sure its archive is highlighted as something that applies the INotifyCollectionChanged. With your second and third listboxes, you can also create the properties of binding for your textbox for filtering any of these. When the value changes, you can simply adjust the in-memory collection which is bound to the list.
There is a Google for MVVM because it works great. Most examples will be related to WPF but it is still applicable to whatever you are doing.
In addition to this, check out a product at Codeplex called 'Bindable Link' which allows you to do such things:
var q = P Select Abundant (P);
Comments
Post a Comment