0

I have taken the values from database using Entity Framework , I have that a class called EmployeeDetail in that I have one property called JOined AS.

It gives the values as 'F' for fresher and 'E' for experience.. I need to display this value in DataGrid as Experience or Fresher instead of F or E..

For that I have created the partial class for EmployeeDetail and created one property CustJoinedAs ...

But I didn't get idea to compare the value and return the required value to DataGrid Column...

Here I also have to give each value to DataGrid.. is it automatically bind when I give the property to Column in DataGrid...or any propetyChanged Events have to be Write..

please give a brief idea.. and Code..

Thank you

4

1 回答 1

1

You can implement the property in partial class like

public partial class EmployeeDetail
{
    public string CustJoinedAs
    {
       get{return this.JoinedAs = "E"? "Experienced" : "Fresh";}
    }
}

And bind column of grid to CustJonedAs despite of JoinedAs.

于 2012-05-29T05:26:41.843 回答