c# - Select specific record in CollectionVIewSource using code -


Hi, I have a simple question which is clearly above me

  private Object Select_CommandExecute (Object Element) {// Select from where to signup:  

How do I get a collection ViewSource to select a specific record? Tag = '2'; Var select = context.signups.Where (s => gt; s.tag == 2); Return Signup ViewSmart. View. Turn on main (select); }

But all this does clarify all areas. Any ideas how do I do this? No matter how many passes I pass, the result is always the same.

I'm looking for what the filter is looking for. Here's a sample code using filters.

  IList & lt; Employer & gt; Employers; Iklanviewuimowner view; Private string _filterString = string.Empty; Public Window 1 () {InitializeComponent (); Employer = GetCustomers (); _employerView = ArchiveViewSource Gate default view (employer); _employerView.Filter = Employer Filter; } Public Bull Employer Filter (Commodity object) {Employer Employer = As an Employer; Return employer Name. ToLower () Start (_filterString.ToLower ()); } Public string filter string {get {return_filterString; } Set {_filterString = value; OnPropertyChanged ("FilterString"); _employerView.Refresh (); }}  

Hope this help


Comments