You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, [DetailsViewDataGrid](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DetailsViewDataGrid.html) will not be exported to PDF. You can export `DetailsViewDataGrid` by setting `CanExportDetailsView` property as true.
<imgsrc="Images/export-to-pdf/maui-datagrid-exportdetailsview.png"alt="Maui DataGrid displays Nested dataGrid exported to PDF"width="404"/>
1165
+
1166
+
By default, only expanded DetailsViewDataGrids only will be exported to PDF document. If you want to export all the DetailsViewDataGrids, you need to set `CanExportAllDetails` as true.
<imgsrc="Images\export-to-pdf\maui-datagrid-exportalldetails.png"alt="Nested dataGrid exported to PDF"width="404"/>
1181
+
1182
+
Here, first record only expanded in SfDataGrid. But all the DetailsViewDataGrid’s are shown in exported PDF document.
1183
+
1184
+
You can customize its exporting operation by using `DataGridChildPdfExportingEventArgs`.
1185
+
1151
1186
By default, [DetailsViewDataGrid](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DetailsViewDataGrid.html) will be exported to PDF. You can customize its exporting operation by using `DataGridChildPdfExportingEventArgs`.
Here, `DetailsViewDataGrid` is not exported for the parent record having OrderID as 1002.
1182
1217
1183
1218
## Customizing DetailsViewDataGrid cells
1184
-
Like parent DataGrid, you can customize the DetailsViewDataGrid cells also by using [DataGridCellPdfExportingEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.Exporting.DataGridCellPdfExportingEventArgs.html).
1219
+
Like parent DataGrid, you can customize the DetailsViewDataGrid cells also by using [DataGridCellPdfExportingEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.Exporting.DataGridCellPdfExportingEventArgs.html).Based on `DataGridCellPdfExportingEventArgs.DetailsViewDefinition` property, you can identify the particular DetailsViewDataGrid and customize it.
if (e.DetailsViewDefinition==null&&e.DetailsViewDefinition?.RelationalColumn!="OrdersList")
1240
+
{
1241
+
return;
1242
+
}
1243
+
1206
1244
if (e.ColumnName=="OrderID")
1207
1245
{
1208
1246
varcellStyle=newPdfGridCellStyle();
@@ -1212,6 +1250,6 @@ Like parent DataGrid, you can customize the DetailsViewDataGrid cells also by us
1212
1250
}
1213
1251
}
1214
1252
```
1215
-
<imgalt="Customizing DetailsViewDataGrid while exporting to Excel in DataGrid"src="Images\export-to-pdf\maui-datagrid-customize-detailsview.png"Width="404"/>
1253
+
<imgalt="Customizing DetailsViewDataGrid while exporting to PDF in DataGrid"src="Images\export-to-pdf\maui-datagrid-customize-detailsview.png"Width="404"/>
0 commit comments