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,
ASPxListBox synchronization with server on ASPxCallback
Answers approved by DevExpress Support
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:
- Assign the ASPxListBox's data source and populate this data source between callbacks;
- 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