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

How to tell that I don't want to export child tables

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 28 Feb 2008, 06:19 PM
Hello,

Using recent version xxx.1425,35 I found that things have been corrected concerning export, but I am still unable to avoid exporting of child tables when i export to excel.
Here is part of my server code when the export button is clicked
                foreach (GridDataItem item in RadGrid1.Items)
                {
                    if (item.HasChildItems && CBNoExportProductLines.Checked)
                    {
                        GridNestedViewItem nestedViewItem = item.ChildItem;
                        foreach (GridDataItem childItem in nestedViewItem.NestedTableViews[0].Items)
                        {
                            childItem.Display = false;
                        }
                    }
                }

but it has no effect because a new automatic rebind for the detail grid is triggered just after this and all items get display=true.
Is there any global way to say that I don't need to export these details ?

Thanks for help.
CS

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 04 Mar 2008, 08:30 AM
Hi Christian,

Have you tried setting RadGrid1.MasterTableView.HierarchyDefaultExpanded = false; instead and does that work for you?

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or