RadListBox ClientChanges lost during validation

3 posts, 0 answers
  1. Scott
    Scott avatar
    16 posts
    Member since:
    Jul 2012

    Posted 24 Jul 2012 Link to this post

    I have a tabbed dialog with a pair of RadListBox controls with transfer enabled where I am using ClientChanges to determine what the user has done.  This works great for the normal case, however in the situation where the user has made a mistake (on another tab) and the dialog posted to the server and returned without saving and the dialog showing a validation error (with focus on the tab where the error was made) things are very broken.  When I return to the tab the RadListBox controls continue to show the proper items, but have clearly lost the change list so when the user fixes whatever was wrong (that caused the validation to fail) and resubmits the dialog no changes are seen on the server side (ClientChanges is empty).  I'm not sure how to fix this as the user has no indication that anything is wrong and the server has no indication that anything is wrong.  The user could make any change in the list boxes including undoing the changes they made prior to the previous submission, so just storing the ClientChanges change list on the server would not work. 

    Is this just a bug in the list box control?  Is there something I should be doing that I have not done? 

    Thanks for any help,

  2. Scott
    Scott avatar
    16 posts
    Member since:
    Jul 2012

    Posted 27 Jul 2012 Link to this post

    Well, having received no replies and having found no workaround I have concluded that this is simply a bug in the RadListBox (it does not retain the ClientChanges list over multiple post back events) so I have had to change my code so that it does not rely on ClientChanges.  I can actually see no good use for ClientChanges on the server side with the current behavior.
  3. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 01 Aug 2012 Link to this post

    Hello Scott,

    In general in order to persist any changes made on the client after a post back the trackChanges and commitChanges client-side method should be used, otherwise the changes are lost. This is mentioned in the following help article here under the Preserving changes section.

    Regarding the problem described in your post, we would need to examine the exact implementation used in order to conclude whether the experienced behavior is a bug or not. Could create a simplified version of your real world scenario and post it here?

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top