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

How to suppress detailTable bind when exporting?

2 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 14 Jul 2010, 02:17 PM
2010.1.706.35, VS2008 IE8

I have master/child table where the child table is bound by "Client" for performance reasons, so each page's client details are retrieved with the parent record.

I also have an Export button but I am only outputting the master table information.   However it's very slow (I have other exports not involving bind by Client and it's fast) so I believe the Grid is also trying to retrieve child table information during export.   There are only 1,500 rows at the parent table.  Tried exporting via CSV or Excel HTML.

1) Is there a way to prevent detail table binding in code behind when exporting?   (other than not declaratively using bind by "Client" at all)

2) When using Excel HTML export, I noticed the result has garbage information and I believe this is because one of the detail table field can store HTML comments.   What's the typical way to resolve exporting in HTML when the field value might have HTML tags?

2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 14 Jul 2010, 03:05 PM
Hello Lenny_shp,

Indeed, your observations are right.
However, you can try changing the HierarchyLoadMode to ServerOnDemand before calling the export command. Thus the load mode would be changed only during the export.

Give it a try and let me know if it works for you.

Sincerely yours,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lenny_shp
Top achievements
Rank 2
answered on 14 Jul 2010, 04:40 PM
Thanks that worked.   I guess I don't need to set it back to "Client" mode after export since it seems to be working after that?
Tags
Grid
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Lenny_shp
Top achievements
Rank 2
Share this question
or