This is a migrated thread and some comments may be shown as answers.

ExportToExcelML and custom object

3 Answers 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nino
Top achievements
Rank 1
Nino asked on 09 May 2013, 10:11 AM
Good morning,

after binding a collection (List) of custom object to a gridview (with no problem) i am using ExportToExcelML to export that grid in excel;

it does export only object's property of a "know" type..

Example 

class Car
{
public string Name ;
}


Class Customer
{
public string Name;
public Car Car{get;protected set;}
}

binding radgridview with a List<Customer> and exporting to excel will export just "Name" property and not "Car" , when in the gridview is shown correctly.
 is there any interface i need to implement in my classes? 

Thanks 

Nino

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 May 2013, 06:12 AM
Hello Nino,

Thank you for writing.

Could you please provide me with the code you used to populate the list and bind the grid to this list. You have a protected setter of the Car property and I am not sure how you populate the List in this case.

Once I am able to populate the grid as on your side, I will investigate the exporting issue you experience.

I am looking forward to your reply.
 

All the best,
Stefan
the Telerik team
RadChart for WinForms is obsolete. Now what?
0
Nino
Top achievements
Rank 1
answered on 23 May 2013, 12:50 PM
Hi Stefan,

i solved it binding the gridcolumn to the Car.Name property.

Doing this it export correctly in excel...i just meant the IML were using the toString method as the grid does.


Thanks
0
Stefan
Telerik team
answered on 28 May 2013, 07:23 AM
Hello,

I am glad you have sorted this out. Should you have any other questions, do not hesitate to contact us.
 
Regards,
Stefan
Telerik
RadChart for WinForms is obsolete. Now what?
Tags
GridView
Asked by
Nino
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Nino
Top achievements
Rank 1
Share this question
or