Current filter:
                                You should refresh the page.
                                  • Hi,

                                    I have a Dashboard with Filters items (TreeView and  Listox) and chart items.

                                    I wan to export the Dashboard to PDF and PNG without filter items (TreeView and Listbox) - MVC Dashboard .

                                    Please help how can i do it.

                                    please see the attached file with the images and how i want to see it.

                                    Thank you.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Jose,

                                If I understand you correctly, you need to hide all the filter elements before exporting a dashboard. I suggest you handle the BeforeExportDocument event and hide the required items using their item names or types:

                                [C#]
                                private static void Default_BeforeExportDocument(object sender, BeforeExportDocumentWebEventArgs e) { e.HideItem(m => m is FilterElementDashboardItem); }

                                I have created a sample project to illustrate how this works. Please see the attachment.

                                • Jose Isga 12.06.2018
                                  Hi Stason,

                                  Thank you for the answer and it was excellent.
                                  I have one more question, How can i hide the group element? i have all the filter elements inside a group element.
                                  I am using the following code but it is not working to hide the group element too.


                                          private static void Default_BeforeExportDocument(object sender, BeforeExportDocumentWebEventArgs e)
                                          {
                                              // Hides all Group elements from the exported document.
                                              e.HideItem((DashboardItem item) => item is DashboardItemGroup);
                                              // Hides all filter elements from the exported document.
                                              e.HideItem((DashboardItem item) => item is FilterElementDashboardItem);
                                          }

                                  Thank you.
                                • Stason (DevExpress Support) 12.07.2018
                                  Hello Jose,

                                  Thank you for this additional detail. I have checked it and can't hide the group item on exporting the dashboard. I have created a separate ticket MVC Dashboard - It is impossible to hide a group item on the dashboard export to research this behavior further. I will update that ticket once we get any result.