Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Moving Items between List Boxes

 
Add >
Add All >>
< Remove
<< Remove All
 

This demo illustrates how all items, or only selected items, can be moved from one DevExpress ASP.NET List Box (ASPxListBox) to another on the client side in response to button clicks.

Selected items are obtained using an editor's client GetSelectedItems method. Items are moved by removing them from the Items collection of one editor (via the client RemoveItem method), and adding them to another editor (via the client AddItem method).

Note that the client BeginUpdate and EndUpdate methods are used by both editors to encapsulate the code that moves items. This is required to avoid repetitive operations (such as editor size correction) until all items are moved.

The EnableSynchronization property set to true enables you to pass the items collection's changes to the server side. This also allows keeping the client changes between postbacks.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxEditorsDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxEditorsDemos