Hi Rodolfo,
When you use templates, you have to call the
DataBind() server method when you add new nodes, so that the binding expressions can be evaluated. In the case of the example, you can make a partial postback using RadAjaxManager. Here's how you can do that:
1. Put all ListBoxes inside a Panel with ID="Panel1" (this is not required, but that way it takes less code to refresh all ListBoxes).
2. On Page_Load call the
DataBind() method for all ListBoxess. Like so:
Copy Code
3. Modify the
transferManager._transfer function, so that it looks like this:
Copy Code
Please note, that in order for the changes to be persisted after a postback, you have to also call
trackChanges() and
commitChanges() in the same function.
Unfortunately the second issue is a little bit more difficult to resolve. Currently client manipulation of the cssClass property of
RadListBoxItem is not implemented, so you won't be able to persist any changes made to the css of an item to the server.
Greetings,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license!
Book your seat now >>