Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my wpf data grid has 2 columns must be bind to display 2 different results
my business logic is:
i have 2 combobox display same data , but each one of them bind to different tables ,
and I want to display data in datagrid column be same

ex:
var query = from m in context.PersonInfo
join r in context.Rank
on m.RecentRankNo equals r.RankID
join s in context.Situation
on m.SituationNO equals s.SituationID

join servRecord in context.ServiceRecord
on m.UniqueID equals servRecord.PersonNo

join sit in context.Situation
on servRecord.ServiceRecordType equals sit.SituationID

where servRecord.ServiceRecordType == serviceRecordIdTrue
select new {
m.personID,
m.PersonFullName,
servRecord.Notes, sit.SituationName
}
I want to display in datagrid this fields from select query also 2 column , 1- sit.SituationName which refer to m.SituationNO and ,2- sit.SituationName refer to servRecord.ServiceRecordType
---------------------
if i write in column binging={binding path="SituationName"} displays to different values
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900