Bug Report B148307
Visible to All Users

ASPxListBox synchronization with server on ASPxCallback

created 15 years ago

Hi,
I have an ASPxCallbackPanel that contains an ASPxListBox. I call ASPxCallbackPanel.PerformCallback to do two operation. In first call i add some items on server to list box and in second call i want to use list box items, but list box is not synchronize with server. You can find a sample project as an attached file.
Thanks,

Answers approved by DevExpress Support

created 15 years ago (modified 13 years ago)

Hello Corey,
Thank you for sending your test project to me. The ASPxListBox's state is not stored between callbacks. Therefore, if an item was added to the ASPxListBox, this item would be shown on the client side. However, the information about this item will be lost in the next callback.
To update ASPxListBox items via the callback technology, ASPxListBox should store the information about its items on the server side by itself. It's recommended to implement the following scenario:

  1. Assign the ASPxListBox's data source and populate this data source between callbacks;
  2. Bind the ASPxListBox with its data source when the required items are added to this data source.
    I've attached a modified project, illustrating how to implement this functionality.
    Regards,
    Mike
    Comments (1)

      Thanks

      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.