Current filter:
                                You should refresh the page.
                                  • I'm using the spin edit control in batch mode and like the way it handles the validation and formatting of the numeric values entered.  Is it possible to dynamically change the "MaxValue" field when editing to reference a value keyed into another field of the grid row?

                                    <aspx:GridViewDataSpinEditColumn FieldName="Discount" Width="50">
                                      <PropertiesSpinEdit DisplayFormatString="c" DisplayFormatInEditMode="true" MinValue="0" MaxValue="60000">
                                          <ValidationSettings EnableCustomValidation="true" Display="Dynamic" />
                                      </PropertiesSpinEdit>
                                    <aspx:GridViewDataSpinEditColumn> 

                                1 Solution

                                Creation Date Importance Sort by

                                Hi,

                                You can handle the Validation event and generate custom text there:

                                [ASPx]
                                <aspx:GridViewDataSpinEditColumn FieldName="Discount" Width="50"> <PropertiesSpinEdit DisplayFormatString="c" DisplayFormatInEditMode="true" MinValue="0" MaxValue="60000"> <ValidationSettings EnableCustomValidation="true" Display="Dynamic" /> <ClientSideEvents Validation="onValidation" /> </PropertiesSpinEdit> <aspx:GridViewDataSpinEditColumn>
                                [JavaScript]
                                function onValidation(s,e) { e.isValid = false; e.errorText = "..."; }

                                Let me know if this helps.

                                • Patrik J 09.11.2019

                                  We just tried this on a TextBox column

                                                      </dx:GridViewDataCheckColumn>
                                                      <dx:GridViewDataTextColumn Caption="Anskaffningsvärde" FieldName="TotalLeasingAmount" ShowInCustomizationForm="True" VisibleIndex="8" ReadOnly="True">
                                                          <PropertiesTextEdit DisplayFormatInEditMode="True" DisplayFormatString="C">
                                                              <ValidationSettings Display="Dynamic" EnableCustomValidation="True">
                                                                  <RequiredField IsRequired="True" />
                                                                  <ClientSideEvents Validation="onValidation" />
                                                              </ValidationSettings>
                                                          </PropertiesTextEdit>
                                                      </dx:GridViewDataTextColumn>

                                  And got an error about the grid not having a public property clientsideevents?

                                • Helen (DevExpress Support) 09.11.2019

                                  Hello Patrik,

                                  I see that you are trying to declare ClientSideEvents inside the VaildationSettings scope. However, they should be set inside the PropertiesTextEdit scope instead:

                                  [ASPx]
                                  ... <PropertiesTextEdit DisplayFormatInEditMode="True" DisplayFormatString="C"> <ValidationSettings Display="Dynamic" EnableCustomValidation="True"> <RequiredField IsRequired="True" /> </ValidationSettings> <ClientSideEvents Validation="onValidation" /> </PropertiesTextEdit> ...
                                • Patrik J 09.11.2019

                                  Ah, thanks