A bug fix (S30076) has resulted in a change being introduced to the automatic item synchronization mechanism of the ASPxComboBox and ASPxListBox editors.
Previously, the automatic item synchronization (which by design should be disabled when callback mode is used) still used to accumulate modifications made to an editor's Items collection via server code while processing a callback sent by the editor's client PerformCallback method. This resulted in having a wrong Items collection on the server (for instance, a collection with duplicated items) next time the valid automatic synchronization took place (on the nearest postback, for instance). In addition, the incorrectly working item synchronization always supplied the server Items collection with the item selected on the client, even if this item was not actually present within the Items collection.
In v2009 vol.2.4, this incorrect behavior has been fixed. Now, the following is considered to be the only true way to maintain modifications made to the Items collection during processing of a callback initiated via an editor's client PerformCallback method:
The Items collection should always be updated and maintained in its actual state on the server. This implies that the result of server manipulations that affect the Items collection contents should be preserved somehow (for instance, by saving the Items collection itself into a data source or by storing (in a Session or hidden fields, etc.) parameters that specify how the Items collection is populated).
If this corrected behavior of item synchronization mechanism negatively affects your project when upgrading from 9.1 to 9.2, and you don't want to always update the Items collection to preserve it in its actual state, you can use either of the following approaches:
- You can switch off the made bug fix of item synchronization by setting the new EnableSynchronizationOnPerformCallback property to True. This returns the behavior available in version 9.1.
- If you don't want to return to the 9.1 behavior, but you want to obtain the selected item's Value without updating the server Items collection to its actual state, you can use the new ClientValue property.
Note that these new properties (EnableSynchronizationOnPerformCallback and ClientValue) are not visible within the Property Grid and IntelliSense, because they are not commonly used, and they might be required by a limited number of customers only that have a non-standard complex logic of item list modification. Note that the EnableSynchronizationOnPerformCallback property is declared as virtual to make it available within any custom descendants of our ASPxComboBox or ASPxListBox editors.
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.