Reset Client Changes

3 posts, 1 answers
  1. richamo
    richamo avatar
    59 posts
    Member since:
    Sep 2006

    Posted 09 Sep 2010 Link to this post

    Hi,

    Is there a way to reset all changes made by the client-side (since the last postback) with a client-side script call. If not can I store the last server state in a custom attribute and restore it. I am using Q1 2010 version with checkboxes and reordering by drag and drop features.

    Help is appreciated

    Bye 

    Morgan
  2. Answer
    Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 14 Sep 2010 Link to this post

    Hello richamo,

    You can reset the changes made to a listbox with the following script:

    <script type="text/javascript">
           function clearState(listBox) {
               listBox._logEntriesJson = "[]";
               listBox._selectedIndicesJson = "[]";
               listBox._checkedIndicesJson = "[]";
               listBox.updateClientState();
           }
       </script>

    Where listBox is the instance of RadListBox that you want to reset.

    Best wishes,
    Genady Sergeev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. richamo
    richamo avatar
    59 posts
    Member since:
    Sep 2006

    Posted 28 Sep 2010 Link to this post

    Hi Genady,

    Thank you for the clue ! I'm sorry to reply only now but I was a little busy.

    Great support ! thanks again.

    Morgan
Back to Top