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
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: