data binding - How to bind WPF Datagrid to a joined table -
I have a big problem, I try to force my WPF DataGrid
on a table I have created a class for information on how to successfully convert:
<> public class NeshtoSi {public NeshtoSi {} public string SSN; The name of the public string; Public string alias; }
and after that I add the internal tables. However when I assign DataGrid
do not imagine them.
var dd = d to datacontext. Join medical_examination datacentext DSN.N. But patients have to use P.S.N.N. Select New Nationos {SSN = DSN, name = p. Name, surname = p. Name}; IQueryable & LT; NeshtoSi & gt; SQuery = dd; If (! String.IsNullOrEmpty (serName.Text)) sQuery = sQuery.Where (x => x.name.Contains (serName.Text)); If (! String.InsalOuracty (Serum Test)) sQuery = sQuery.Where (x => x.surname.Contains (serSurame.Text)); If (! String.InsalOuractic (sarsectext) sQuery = sQuery.Where (x => x.ssn.Contains (serSSN.Text)); Var result = sQuery.ToList (); AnSearch.ItemsSource = sQuery;
I hope someone can help me ...
The code you have presented looks fine - no matter how the object is made - objects that are the object itself
Instead of showing it to us, you should show Zaml.
One more thing - are we talking about dandgrid scenes or that comes with WPF Toolkit?
=======================================
Sorry. I lost it in the first place - there are no qualities in your class! You create a public field and potentially have problems instead of properties.
The code should look like this:
public class NeshtoSi {public NeshtoSi {} public string SSN {Receive; Set;} public string name {get; Set;} public string aliases {get; Set;}}
Comments
Post a Comment