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

always export toggle visibility expanded data

1 Answer 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mani
Top achievements
Rank 1
Mani asked on 01 May 2013, 10:49 AM
Hi I need to export all the data from the grid
I am using toggle visibility  , so when i export the data i am getting the data that is only opened .But I need to export the whole data . Please suggest me

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 01 May 2013, 01:08 PM
Hi Mani,

Do you use Telerik Reporting? Generally Telerik Reporting don't have a Grid control. Instead we provide a Table and Crosstab item. If you are utilizing Telerik Reporting, the experienced behavior is by design because we only process the report once when previewed in the report viewer and every time you export/print the report we use the already processed report instance and only render it in the desired format. In order to expand all the toggled groups/items when exporting our suggestion is to use a custom export functionality by utilizing the ReportProcessor.RenderReport method and set up the reports drill down functionally with binding to the following user function:

public static IAction SetupActions(object action, object value)
{
    var drillDownAction = (ToggleVisibilityAction)action;
    var expand = (bool)value;
 
    drillDownAction.DisplayExpandedMark = !expand;
    foreach (ReportItemBase t in drillDownAction.Targets)
    {
        t.Visible = expand;
    }
 
    return drillDownAction;
}
Then setup a Binding for every report item with drill down action:

Property path  Expression
 Action  =SetupActions(ReportItem.ItemDefinition.Action, Parameters.Parameter1.Value)

Additionally you may find useful the following help resources:

Regards,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Mani
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or