Breaking Change T846133
Visible to All Users

ASP.NET Web Forms and Bootstrap Data Editors - Editors validate their values on the server side even if the user made no changes on the client side

To strengthen data security of our data editor components, DevExpress ASP.NET WebForms and Bootstrap Data Editors now validate their values on the server side even if the user does not modify the editor values on the client side.

Starting with the v19.2.2, the following properties are involved in data editors validation:

ASP.NET WebForms:

ASPxTextBox

ASPxSpinEdit

ASPxCalendar

ASPxDateEdit

ASPxListBox

ASPxComboBox

ASPxTokenBox

ASP.NET Bootstrap:

BootstrapTextBox

BootstrapSpinEdit

BootstrapCalendar

BootstrapDateEdit

BootstrapListBox, BootstrapComboBox, BootstrapTagBox
An editor does not check whether its edit value has a match in the item list (DataSecurityMode is set to Strict).

BootstrapComboBox

Workaround

This change may affect your existing application.

To revert all data editors in a project to the previous behavior, set the ASPxWebControl.BackwardCompatibility.DataEditorsEnableValidationForNotModifiedValues static property to False.

Global.asax:

C#
void Application_Start(object sender, EventArgs e) { ASPxWebControl.BackwardCompatibility.DataEditorsEnableValidationForNotModifiedValues = false; }
Visual Basic
Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ASPxWebControl.BackwardCompatibility.DataEditorsEnableValidationForNotModifiedValues = False End Sub

Another way to customize the behavior of individual data editors in your application is to modify any of the validation settings mentioned above so that they meet your requirements.

As for the DevExpress ASP.NET Bootstrap ComboBox, ListBox and TagBox components, use the following code to allow adding new list items on the client and then synchronizing modifications with the server item collection.

C#
// Bootstrap List Box ((ASPxListBox)ListBox).DataSecurityMode = DevExpress.Web.DataSecurityMode.Default; // Bootstrap Combo Box ((ASPxComboBox)ComboBox).DataSecurityMode = DevExpress.Web.DataSecurityMode.Default; // Bootstrap Combo Box Column var comboBoxColumn = (DevExpress.Web.Bootstrap.BootstrapGridViewComboBoxColumn)TestGrid.DataColumns["A"]; var propertiesComboBox = (ComboBoxProperties)comboBoxColumn.PropertiesComboBox; propertiesComboBox.DataSecurityMode = DevExpress.Web.DataSecurityMode.Default; // Bootstrap Tag Box ((ASPxTokenBox)TagBox).DataSecurityMode = DevExpress.Web.DataSecurityMode.Default; // Bootstrap Tag Box column var tagBoxColumn = (DevExpress.Web.Bootstrap.BootstrapGridViewTagBoxColumn)TestGrid.DataColumns["B"]; var propertiesTagBox = (TokenBoxProperties)tagBoxColumn.PropertiesTagBox; propertiesTagBox.DataSecurityMode = DevExpress.Web.DataSecurityMode.Default;
Visual Basic
' Bootstrap List Box (CType(ListBox, ASPxListBox)).DataSecurityMode = DevExpress.Web.DataSecurityMode.[Default] ' Bootstrap Combo Box (CType(ComboBox, ASPxComboBox)).DataSecurityMode = DevExpress.Web.DataSecurityMode.[Default] ' Bootstrap Combo Box Column Dim comboBoxColumn = CType(TestGrid.DataColumns("A"), DevExpress.Web.Bootstrap.BootstrapGridViewComboBoxColumn) Dim propertiesComboBox = CType(comboBoxColumn.PropertiesComboBox, ComboBoxProperties) propertiesComboBox.DataSecurityMode = DevExpress.Web.DataSecurityMode.[Default] ' Bootstrap Tag Box (CType(TagBox, ASPxTokenBox)).DataSecurityMode = DevExpress.Web.DataSecurityMode.[Default] ' Bootstrap Tag Box Column Dim tagBoxColumn = CType(TestGrid.DataColumns("B"), DevExpress.Web.Bootstrap.BootstrapGridViewTagBoxColumn) Dim propertiesTagBox = CType(tagBoxColumn.PropertiesTagBox, TokenBoxProperties) propertiesTagBox.DataSecurityMode = DevExpress.Web.DataSecurityMode.[Default]

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.