Hi
am using to Gridview to export in Excel,
here am i have Employee DTO--> EmpNo, Ename, Dno.
and i have Dept DTO--> Dno, Dname , Location,
Here i have create class EmployeeListDTO which has all string poroperty, (i.e)
public class EmployeeListDTO
{
Public string EmpName {get; set;}
public string DeptName { get; set;}
public string Location { get; set;}
}
i got list of collection from above two class,
Create a new collection ObservableColection<EmployeeList> myList=new ObservableColection<EmployeeList>();
Now in the myList i have assign the above list, now i set to the datagrid, its working fine
the grid is display like this
EmpName DepName Location
AAA XXX USA
BBB YYY Europe
CCC XXX Canada
Now am trying to Export this grid to Excel, it is exporting sucessfully, but when i check the excel sheet, it was displaying like this
EmpName DepName Location
AAA EmployeeListDTO EmployeeListDTO
BBB EmployeeListDTO EmployeeListDTO
CCC EmployeeListDTO EmployeeListDTO
Can any one tell me what is reason, why it was display the object instead of values.
am using to Gridview to export in Excel,
here am i have Employee DTO--> EmpNo, Ename, Dno.
and i have Dept DTO--> Dno, Dname , Location,
Here i have create class EmployeeListDTO which has all string poroperty, (i.e)
public class EmployeeListDTO
{
Public string EmpName {get; set;}
public string DeptName { get; set;}
public string Location { get; set;}
}
i got list of collection from above two class,
Create a new collection ObservableColection<EmployeeList> myList=new ObservableColection<EmployeeList>();
Now in the myList i have assign the above list, now i set to the datagrid, its working fine
the grid is display like this
EmpName DepName Location
AAA XXX USA
BBB YYY Europe
CCC XXX Canada
Now am trying to Export this grid to Excel, it is exporting sucessfully, but when i check the excel sheet, it was displaying like this
EmpName DepName Location
AAA EmployeeListDTO EmployeeListDTO
BBB EmployeeListDTO EmployeeListDTO
CCC EmployeeListDTO EmployeeListDTO
Can any one tell me what is reason, why it was display the object instead of values.