Current filter:
                                You should refresh the page.
                                  • Hi DXTeam,
                                    I've got the following Parameters panel created in a simple DocumentPreviewControl.

                                    I've got also editable fields in my document and I want to alter the way on how Reset and Submit buttons are interacting with the document in a way as follows:

                                    1. Reset should ALWAYS be enabled.
                                    2. After clicking Reset it'll reset not only parameters values but also the whole document along with editable fields to their initial state.
                                    3. Submit should only apply changes specified in Parameters panel and DO NOT reset editable fields.
                                    If those changes are not feasible, then please provide me a way to hide those buttons, and add custom ones with custom handlers.
                                    Here you've got a sample xaml for this preview:
                                    [XAML]
                                    <UserControl x:Class="X.Y.Z.CustomControls.Dialogs.Views.PrintReportDialogView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot; xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml&quot; xmlns:d="http://schemas.microsoft.com/expression/blend/2008&quot; xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars&quot; xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors&quot; xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing&quot; xmlns:dxpbars="http://schemas.devexpress.com/winfx/2008/xaml/printing/bars&quot; xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006&quot; xmlns:parameters="http://schemas.devexpress.com/winfx/2008/xaml/printing/parameters&quot; xmlns:reporting="clr-namespace:X.Y.Reporting;assembly=X.Y.Reporting" xmlns:xtraPrinting="clr-namespace:DevExpress.XtraPrinting;assembly=DevExpress.Printing.v19.1.Core" d:DesignHeight="600" d:DesignWidth="300" mc:Ignorable="d"> <UserControl.Resources> <ResourceDictionary> <DataTemplate x:Key="EditableLargeTextEditTemplate"> <parameters:ParameterLineLayout> <dxe:TextEdit Height="75" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" AcceptsReturn="True" AcceptsTab="True" EditValue="{Binding Value}" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" /> </parameters:ParameterLineLayout> </DataTemplate> <reporting:ReportParameterTemplateSelector x:Key="ReportParameterTemplateSelector" EditableLargeTextEditTemplate="{StaticResource EditableLargeTextEditTemplate}" /> <Style TargetType="{x:Type parameters:ParametersPanel}"> <Setter Property="ParameterTemplateSelector" Value="{StaticResource ReportParameterTemplateSelector}" /> </Style> </ResourceDictionary> </UserControl.Resources> <dxp:DocumentPreviewControl x:Name="DocumentPreviewControl" MinHeight="600" DocumentSource="{Binding ContentReport}"> <dxp:DocumentPreviewControl.HiddenExportFormats> <xtraPrinting:ExportFormat>Csv</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Docx</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Htm</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Image</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Mht</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Prnx</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Rtf</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Txt</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Xls</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Xlsx</xtraPrinting:ExportFormat> <xtraPrinting:ExportFormat>Xps</xtraPrinting:ExportFormat> </dxp:DocumentPreviewControl.HiddenExportFormats> <dxp:DocumentPreviewControl.CommandProvider> <dxp:DocumentCommandProvider> <dxp:DocumentCommandProvider.RibbonActions> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportCsv}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportHtm}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportMht}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportRtf}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportDocx}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportXls}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportXlsx}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportTxt}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportImage}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendCsv}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendMht}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendRtf}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendDocx}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendXls}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendXlsx}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendTxt}" /> <dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.SendImage}" /> </dxp:DocumentCommandProvider.RibbonActions> </dxp:DocumentCommandProvider> </dxp:DocumentPreviewControl.CommandProvider> </dxp:DocumentPreviewControl> </UserControl>

                                    Regards,
                                    Kamil

                                • Yaroslav (DevExpress Support) 09.06.2019

                                  Hi Kamil,
                                  It is not possible to directly control the Reset / Submit buttons behavior without overriding the "ParametersPanel" ControlTemplate. Of course, you can also hide the built-in "Parameters" panel and create a custom one from scratch. You mentioned that the "Submit" should not recreate the document (and thus clear all editable fields). Would you please clarify what kind of logic should be executed on clicking the "Submit" button so we can see what would be the most appropriated solution for your particular case?

                                  Thanks,
                                  Yaroslav

                                • Kamil Stadryniak 09.06.2019

                                  I want to have a dropdown in parameters panel, which would update a field that is later manually editable on the document itself.
                                  So far so good.
                                  But I've got some other editable fields on the same document that I don't want to be cleared upon clicking Submit.

                                1 Solution

                                Creation Date Importance Sort by

                                Hi Kamil,
                                Thank you for the clarification. For your reference, I've attached a sample project that illustrates the following changes over DocumentPreviewControl:

                                1. The Reset button is always enabled.
                                2. Clicking the Reset button resets the editable fields of the produced document and refreshes the viewer.
                                3. Clicking the Reset button resets parameters to previously submitted values (the default behavior).
                                4. Clicking the Submit button does not recreate the current document (changes you do in editable fields are not lost). In the current solution, clicking the Submit button simply refreshes the viewer, but it is possible to perform similar manipulations over editing fields as in #2.

                                Please try this solution and let us know if that's what you're looking for.

                                Regards,
                                Yaroslav

                                • Kamil Stadryniak 09.10.2019

                                  Thank you Yaroslav,
                                  Your solution was not exactly what I wanted but it gave me just enough context on how to work with PrintingSystem object etc. to archive my goals.
                                  Regards,
                                  KS